Browse code

make test var names more generic

Hanno Böck authored on03/05/2020 13:26:39
Showing2 changed files
... ...
@@ -5,7 +5,7 @@ python:
5 5
   - "nightly"
6 6
 env:
7 7
   global:
8
-    - FREEWVS_ONLINETESTS=1
8
+    - RUN_ONLINETESTS=1
9 9
 install:
10 10
   - pip install pycodestyle pyflakes pylint dlint
11 11
 script:
... ...
@@ -11,20 +11,20 @@ TESTDATA_REPO = "https://github.com/schokokeksorg/freewvs-testdata"
11 11
 
12 12
 
13 13
 class TestFreewvsData(unittest.TestCase):
14
-    @unittest.skipUnless(os.environ.get("FREEWVS_ONLINETESTS"),
14
+    @unittest.skipUnless(os.environ.get("RUN_ONLINETESTS"),
15 15
                          "Not running online tests")
16 16
     def test_freewvs_testdata(self):
17
-        tmp = tempfile.mkdtemp(prefix="freewvs-testdata")
18
-        if os.environ.get("FREEWVS_TESTDATA_REPOSITORY"):
19
-            os.symlink(os.environ.get("FREEWVS_TESTDATA_REPOSITORY"),
20
-                       tmp + "/freewvs-testdata")
17
+        tmp = tempfile.mkdtemp(prefix="testdata")
18
+        if os.environ.get("TESTDATA_REPOSITORY"):
19
+            os.symlink(os.environ.get("TESTDATA_REPOSITORY"),
20
+                       tmp + "/testdata")
21 21
         else:
22 22
             subprocess.run(["git", "clone", "--depth=1",
23 23
                             TESTDATA_REPO,
24
-                            tmp + "/freewvs-testdata"],
24
+                            tmp + "/testdata"],
25 25
                            check=True)
26 26
 
27
-        for tdir in glob.glob(tmp + "/freewvs-testdata/webapps/*"):
27
+        for tdir in glob.glob(tmp + "/testdata/webapps/*"):
28 28
             bdir = os.path.basename(tdir)
29 29
             for tarball in glob.glob(tdir + "/dist/*"):
30 30
                 shutil.unpack_archive(tarball, "%s/%s/%s-src"