diff --git a/britney.conf b/britney.conf index 10c8c5d..32fd8dd 100644 --- a/britney.conf +++ b/britney.conf @@ -88,7 +88,7 @@ ADT_AMQP = file:///srv/release.debian.org/britney/var/data-b2/output/de # space separate list of PPAs to add for test requests and for polling results; # the *last* one determines the swift container name ADT_PPAS = -# set this to the path of a (r/o) results.cache for running many parallel +# set this to the path of a (r/o) autopkgtest-results.cache for running many parallel # britney instances for PPAs without updating the cache ADT_SHARED_RESULTS_CACHE = # Swift base URL with the results (must be publicly readable and browsable) diff --git a/britney.conf.template b/britney.conf.template index 6b7537c..2079374 100644 --- a/britney.conf.template +++ b/britney.conf.template @@ -118,7 +118,7 @@ ADT_AMQP = file:///path/to/britney/debci.input # space separate list of PPAs to add for test requests and for polling results; # the *last* one determines the swift container name ADT_PPAS = -# set this to the path of a (r/o) results.cache for running many parallel +# set this to the path of a (r/o) autopkgtest-results.cache for running many parallel # britney instances for PPAs without updating the cache ADT_SHARED_RESULTS_CACHE = # Swift base URL with the results (must be publicly readable and browsable) diff --git a/britney2/policies/autopkgtest.py b/britney2/policies/autopkgtest.py index 921faae..56acdec 100644 --- a/britney2/policies/autopkgtest.py +++ b/britney2/policies/autopkgtest.py @@ -65,7 +65,7 @@ class AutopkgtestPolicy(BasePolicy): # tests requested in this and previous runs # trigger -> src -> [arch] self.pending_tests = None - self.pending_tests_file = os.path.join(self.options.state_dir, 'pending.json') + self.pending_tests_file = os.path.join(self.options.state_dir, 'autopkgtest-pending.json') # results map: trigger -> src -> arch -> [passed, version, run_id] # - trigger is "source/version" of an unstable package that triggered @@ -80,7 +80,7 @@ class AutopkgtestPolicy(BasePolicy): if self.options.adt_shared_results_cache: self.results_cache_file = self.options.adt_shared_results_cache else: - self.results_cache_file = os.path.join(self.options.state_dir, 'results.cache') + self.results_cache_file = os.path.join(self.options.state_dir, 'autopkgtest-results.cache') try: self.options.adt_ppas = self.options.adt_ppas.strip().split() @@ -566,7 +566,7 @@ class AutopkgtestPolicy(BasePolicy): testinfo = json.loads(tar.extractfile('testinfo.json').read().decode()) except (KeyError, ValueError, tarfile.TarError) as e: self.logger.error('%s is damaged, ignoring: %s', url, str(e)) - # ignore this; this will leave an orphaned request in pending.json + # ignore this; this will leave an orphaned request in autopkgtest-pending.json # and thus require manual retries after fixing the tmpfail, but we # can't just blindly attribute it to some pending test. return diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 2af152f..ecee28e 100644 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -152,7 +152,7 @@ class T(TestBase): pass try: - with open(os.path.join(self.data.path, 'data/testing/state/pending.json')) as f: + with open(os.path.join(self.data.path, 'data/testing/state/autopkgtest-pending.json')) as f: self.pending_requests = json.load(f) except IOError: self.pending_requests = None @@ -368,7 +368,7 @@ class T(TestBase): self.assertNotIn('Failure', out, out) # caches the results and triggers - with open(os.path.join(self.data.path, 'data/testing/state/results.cache')) as f: + with open(os.path.join(self.data.path, 'data/testing/state/autopkgtest-results.cache')) as f: res = json.load(f) self.assertEqual(res['green/1']['green']['amd64'], [False, '1', '20150101_020000@']) @@ -1390,7 +1390,7 @@ class T(TestBase): self.run_it( [], {'lightgreen': (False, {'lightgreen/2': {'amd64': 'REGRESSION', 'i386': 'RUNNING'}})}) - with open(os.path.join(self.data.path, 'data/testing/state/results.cache')) as f: + with open(os.path.join(self.data.path, 'data/testing/state/autopkgtest-results.cache')) as f: contents = f.read() self.assertNotIn('null', contents) self.assertNotIn('None', contents) @@ -2299,11 +2299,11 @@ class T(TestBase): ### 'lightgreen': ['amd64', 'i386']}}) def test_shared_results_cache(self): - '''Run with shared r/o results.cache''' + '''Run with shared r/o autopkgtest-results.cache''' self.data.add_default_packages(lightgreen=False) - # first run to create results.cache + # first run to create autopkgtest-results.cache self.swift.set_results({'autopkgtest-testing': { 'testing/i386/l/lightgreen/20150101_100000@': (0, 'lightgreen 2', tr('lightgreen/2')), 'testing/amd64/l/lightgreen/20150101_100000@': (0, 'lightgreen 2', tr('lightgreen/2')), @@ -2315,7 +2315,7 @@ class T(TestBase): ) # move and remember original contents - local_path = os.path.join(self.data.path, 'data/testing/state/results.cache') + local_path = os.path.join(self.data.path, 'data/testing/state/autopkgtest-results.cache') shared_path = os.path.join(self.data.path, 'shared_results.cache') os.rename(local_path, shared_path) with open(shared_path) as f: @@ -2340,7 +2340,7 @@ class T(TestBase): {'lightgreen': (True, {'lightgreen/3': {'i386': 'PASS', 'amd64': 'PASS'}})}, ) - # leaves results.cache untouched + # leaves autopkgtest-results.cache untouched self.assertFalse(os.path.exists(local_path)) with open(shared_path) as f: self.assertEqual(orig_contents, f.read())