Skip to content

Commit 279df1b

Browse files
committed
rth: change the working directory on Windows
The tests need to change the working directory when executing on Windows as RPATH is not supported on the platform. The current working directory gets precedence over `PATH` for library lookup. This allows the last of the Evolution tests pass on Windows.
1 parent 7beb358 commit 279df1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/rth

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import argparse
1515
import glob
1616
import os
1717
import pipes
18+
import platform
1819
import shlex
1920
import shutil
2021
import subprocess
@@ -224,6 +225,10 @@ class ResilienceTest(object):
224225
os.path.join(self.tmp_dir, self.config_dir_map[config1], '*'))
225226
command = self.target_run + [output_obj] + tmp_dir_contents
226227
verbose_print_command(command)
228+
# Windows does not have RPATH, make sure that we change the current
229+
# working directory before we execute the test.
230+
if platform.system() == 'Windows':
231+
os.chdir(self.config_dir_map[config1])
227232
returncode = subprocess.call(command)
228233
assert returncode == 0, str(command)
229234

0 commit comments

Comments
 (0)