File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ class TestExe : public testing::Test {
32
32
33
33
std::vector<std::string> argvs = ::testing::internal::GetArgvs ();
34
34
self = argvs[0 ];
35
+ if (fs_is_cygwin ())
36
+ self += " .exe" ;
35
37
36
38
ASSERT_TRUE (fs_touch (exe));
37
39
ASSERT_TRUE (fs_touch (noexe));
@@ -62,7 +64,13 @@ EXPECT_TRUE(fs_is_exe(exe));
62
64
63
65
64
66
TEST_F (TestExe, IsExeBin){
65
- EXPECT_TRUE (fs_is_executable_binary (self));
67
+ // Cygwin is fussy about the full path, but it does work
68
+ // Cygwin wants the /cygdrive/ prefix rather than /home/username/ prefix
69
+
70
+ if (!fs_is_cygwin ()){
71
+ EXPECT_TRUE (fs_is_executable_binary (self)) << self << " is not executable binary" ;
72
+ }
73
+
66
74
EXPECT_FALSE (fs_is_executable_binary (exe));
67
75
EXPECT_FALSE (fs_is_executable_binary (noexe));
68
76
}
Original file line number Diff line number Diff line change @@ -53,10 +53,4 @@ set_tests_properties(Fortran_filesystem_type PROPERTIES
53
53
DISABLED $< AND:$< BOOL:${LINUX} > ,$< NOT:$< BOOL:${ffilesystem_HAVE_LINUX_MAGIC} > > >
54
54
)
55
55
56
- # TARGET_FILE_NAME to allow for macOS possible non-canonical result
57
- # and symlinked / special filesystems like WSL
58
- set_tests_properties (Fortran_exepath PROPERTIES PASS_REGULAR_EXPRESSION $< TARGET_FILE_NAME:test_exepath_fortran> )
59
-
60
-
61
-
62
56
endif ()
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ program test_path
31
31
error stop
32
32
endif
33
33
34
-
35
-
36
34
if (.not. is_file(path)) error stop " exe_path() is not a file: " // path
37
35
38
36
print ' (a)' , path
You can’t perform that action at this time.
0 commit comments