summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorv35stong <v35stong@users.noreply.github.com>2019-05-17 21:08:49 -0400
committerv35stong <v35stong@users.noreply.github.com>2019-05-17 21:08:49 -0400
commit2b2aefb5dab8e56b32d718a3d2e388f56a4f65b0 (patch)
tree5aff21c56db9521cb4ee56356cac1984ae9a6c65
parenta8dabad206a57166bd182dad6895e7d671d0f888 (diff)
Testsuite: fix generator.py on Windows
-rwxr-xr-xsuite/generator.py5
1 files changed, 4 insertions, 1 deletions
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")