Browse Source

tests: disable slow tests unless ENABLE_SLOW_TESTS=1 is set

Marek Marczykowski-Górecki 6 years ago
parent
commit
8d884a52e6
2 changed files with 3 additions and 7 deletions
  1. 1 1
      .travis.yml
  2. 2 6
      qubesadmin/tests/backup/backupcompatibility.py

+ 1 - 1
.travis.yml

@@ -14,7 +14,7 @@ script:
   - test -z "$TESTS_ONLY" || { cd build/lib; ROOTDIR=../.. ../../run-tests; }
   - test -n "$TESTS_ONLY" ||  ~/qubes-builder/scripts/travis-build
 env:
- - TESTS_ONLY=1
+ - TESTS_ONLY=1 ENABLE_SLOW_TESTS=1
 
 after_success:
   - codecov  

+ 2 - 6
qubesadmin/tests/backup/backupcompatibility.py

@@ -786,17 +786,13 @@ class MockFirewall(qubesadmin.firewall.Firewall):
         self.vm.app = AppProxy(self.vm.app, import_data_queue)
 
 
+@unittest.skipUnless(os.environ.get('ENABLE_SLOW_TESTS', False),
+    'Set ENABLE_SLOW_TESTS=1 environment variable')
 class TC_10_BackupCompatibility(qubesadmin.tests.backup.BackupTestCase):
 
     storage_pool = None
 
     def tearDown(self):
-        try:
-            for vm in self.app.domains:
-                if vm.name.startswith('test-'):
-                    del self.app.domains[vm.name]
-        except:
-            pass
         super(TC_10_BackupCompatibility, self).tearDown()
 
     def create_whitelisted_appmenus(self, filename):