diff options
| author | Reid Kleckner <reid@kleckner.net> | 2013-04-30 04:30:41 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2013-04-30 04:30:41 +0000 |
| commit | 95012aaa9371fe1b6dd95749753d75eb6ed1ac20 (patch) | |
| tree | 1bca8e6241d7b2aa20b905ba0cfc5d4c5d81cce3 /llvm/unittests | |
| parent | 02078464e15c3f020b19696e220e5b395ccbd4c3 (diff) | |
| download | bcm5719-llvm-95012aaa9371fe1b6dd95749753d75eb6ed1ac20.tar.gz bcm5719-llvm-95012aaa9371fe1b6dd95749753d75eb6ed1ac20.zip | |
Try to fix ProgramTest on FreeBSD
This seemed like the cleanest way to find the test executable. Also fix
the file mode.
llvm-svn: 180770
Diffstat (limited to 'llvm/unittests')
| -rw-r--r--[-rwxr-xr-x] | llvm/unittests/Support/ProgramTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/unittests/Support/ProgramTest.cpp b/llvm/unittests/Support/ProgramTest.cpp index 279e2e8d0fd..6cbb05454f8 100755..100644 --- a/llvm/unittests/Support/ProgramTest.cpp +++ b/llvm/unittests/Support/ProgramTest.cpp @@ -20,6 +20,9 @@ extern char **environ; #endif +// From TestMain.cpp. +extern const char *TestMainArgv0; + namespace { using namespace llvm; @@ -52,9 +55,7 @@ TEST(ProgramTest, CreateProcessTrailingSlash) { exit(1); } - // FIXME: Hardcoding argv0 here since I don't know a good cross-platform way - // to get it. Maybe ParseCommandLineOptions() should save it? - Path my_exe = Path::GetMainExecutable("SupportTests", &ProgramTestStringArg1); + Path my_exe = Path::GetMainExecutable(TestMainArgv0, &ProgramTestStringArg1); const char *argv[] = { my_exe.c_str(), "--gtest_filter=ProgramTest.CreateProcessTrailingSlashChild", |

