Skip to content

Commit

Permalink
[Windows App SDK Installer] Functional Test Fixes (#4947)
Browse files Browse the repository at this point in the history
* test fixes

* incorporate PR suggestions
  • Loading branch information
ssparach authored and godlytalias committed Dec 13, 2024
1 parent 5b91dee commit 8fe7a35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion installer/dev/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int wmain(int argc, wchar_t *argv[])
else if ((arg == L"-?") || (arg == L"--help"))
{
DisplayHelp();
return 1;
return 0;
}
else if ((arg == L"--info"))
{
Expand Down
5 changes: 2 additions & 3 deletions installer/test/InstallerFunctionalTests/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
#define CONFIGURATION L"Release"
#endif

#define BUILDOUTPUT_DIR L"BuildOutput"
#define INSTALLER_DIR L"WindowsAppRuntimeInstall"
#define INSTALLER_FILENAME L"WindowsAppRuntimeInstall-" ARCH L"exe"
#define INSTALLER_EXE_PATH BUILDOUTPUT_DIR L"\\" CONFIGURATION L"\\" ARCH L"\\" INSTALLER_DIR L"\\" INSTALLER_FILENAME
#define INSTALLER_FILENAME L"WindowsAppRuntimeInstall-" ARCH L".exe"
#define INSTALLER_EXE_PATH INSTALLER_DIR L"\\" INSTALLER_FILENAME

namespace WindowsAppRuntimeInstallerTests
{
Expand Down
6 changes: 5 additions & 1 deletion installer/test/InstallerFunctionalTests/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ namespace WindowsAppRuntimeInstallerTests

std::filesystem::path GetModulePath(HMODULE hmodule)
{
if (hmodule == NULL)
{
hmodule = GetModuleHandle(L"InstallerFunctionalTests.dll");
}
auto path{ GetModuleFileName(hmodule) };
return path.remove_filename();
}
Expand All @@ -134,7 +138,7 @@ namespace WindowsAppRuntimeInstallerTests

// TAEF runs as a package under the installer, so we have to go way up the parent root in order to
// get to the common project root and then get to the build output.
return path.parent_path().parent_path().parent_path().parent_path().parent_path().parent_path().parent_path();
return path.parent_path().parent_path();
}

std::filesystem::path GetInstallerPath()
Expand Down

0 comments on commit 8fe7a35

Please sign in to comment.