From 2b2aefb5dab8e56b32d718a3d2e388f56a4f65b0 Mon Sep 17 00:00:00 2001 From: v35stong Date: Fri, 17 May 2019 21:08:49 -0400 Subject: Testsuite: fix generator.py on Windows --- suite/generator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/suite/generator.py b/suite/generator.py index 89a99c55..044a9fe0 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -177,7 +177,8 @@ class UnitTestFile: api_path = os.path.normpath(api_path) api_path = map(lambda x: '"{0}"'.format(x), api_path.split(os.sep)) api_path = '{0}'.format(', '.join(api_path)) - self.f.write(self.template.format(self.outdir, self.tests, self.binary_tests, self.test_store, api_path).encode('charmap')) + test_store = self.test_store.replace(os.sep, '/') if os.name == 'nt' else test_store + self.f.write(self.template.format(self.outdir, self.tests, self.binary_tests, test_store, api_path).encode('charmap')) self.f.close() def add_verify(self, test_name): @@ -188,6 +189,8 @@ class UnitTestFile: def add_binary_test(self, test_store, binary): name = binary[len(test_store):].replace(os.path.sep, "_").replace(".", "_") + if os.name == 'nt': + binary = binary.replace(os.sep, '/') self.binary_tests += binary_test_string.format(name, binary + ".zip") -- cgit v1.3.1