From ef9ed2d3eb1544bd5e6270e0fbf67814d268c468 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 4 May 2017 16:39:29 +0200 Subject: config: resolve real paths from symlinks, add paths debug logging Tweak test expectations to include the new debug logging. Go through the paths in alphabetical order to get deterministic logging output, so the test expectations always match. Change-Id: I11a905b2467cda691d9ccea30ae436bac96476c9 --- selftest/resource_test.ok | 6 ++++++ selftest/resource_test.ok.ign | 1 + selftest/suite_test.ok | 12 ++++++++++-- selftest/suite_test.ok.ign | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 selftest/resource_test.ok.ign create mode 100644 selftest/suite_test.ok.ign (limited to 'selftest') diff --git a/selftest/resource_test.ok b/selftest/resource_test.ok index 413e5d0..764dfc1 100644 --- a/selftest/resource_test.ok +++ b/selftest/resource_test.ok @@ -9,6 +9,12 @@ The requested resource requirements are not solvable [[0, 2], [2], [0, 2]] ok, caused exception: RuntimeError('Refusing to drop a list of resources from itself. This is probably a bug where a list of Resources() should have been copied but is passed as-is. use Resources.clear() instead.',) - test removing a Resources list from one with the same list in it - test resources config and state dir: +cnf -: DBG: Found config file paths.conf as [PATH]/selftest/conf/paths.conf in ./conf which is [PATH]/selftest/conf +cnf -: DBG: [PATH]/selftest/conf/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/conf/test_work/state_dir +cnf -: DBG: [PATH]/selftest/conf/paths.conf: relative path ./suite_test is [PATH]/selftest/conf/suite_test +cnf -: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/state_dir +cnf -: DBG: Found config file resources.conf as [PATH]/selftest/conf/resources.conf in ./conf which is [PATH]/selftest/conf +cnf -: DBG: Found path state_dir as [PATH]/selftest/conf/test_work/state_dir *** all resources: {'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c', 'arfcn': '512', diff --git a/selftest/resource_test.ok.ign b/selftest/resource_test.ok.ign new file mode 100644 index 0000000..393ce95 --- /dev/null +++ b/selftest/resource_test.ok.ign @@ -0,0 +1 @@ +/[^ ]*/selftest/ [PATH]/selftest/ diff --git a/selftest/suite_test.ok b/selftest/suite_test.ok index 2fad8b3..0321b26 100644 --- a/selftest/suite_test.ok +++ b/selftest/suite_test.ok @@ -1,9 +1,15 @@ - non-existing suite dir ---- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in ./suite_test/. +cnf -: DBG: Found config file paths.conf as [PATH]/selftest/suite_test/paths.conf in ./suite_test which is [PATH]/selftest/suite_test +cnf -: DBG: [PATH]/selftest/suite_test/paths.conf: relative path ./test_work/state_dir is [PATH]/selftest/suite_test/test_work/state_dir +cnf -: DBG: [PATH]/selftest/suite_test/paths.conf: relative path . is [PATH]/selftest/suite_test +cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test +--- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in [PATH]/selftest/suite_test - no suite.conf +cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test cnf empty_dir: DBG: reading suite.conf [empty_dir↪empty_dir] ---- ./suite_test/./empty_dir/suite.conf: ERR: FileNotFoundError: [Errno 2] No such file or directory: './suite_test/./empty_dir/suite.conf' [empty_dir↪./suite_test/./empty_dir/suite.conf] +--- [PATH]/selftest/suite_test/empty_dir/suite.conf: ERR: FileNotFoundError: [Errno 2] No such file or directory: '[PATH]/selftest/suite_test/empty_dir/suite.conf' [empty_dir↪[PATH]/selftest/suite_test/empty_dir/suite.conf] - valid suite dir +cnf -: DBG: Found path suites_dir as [PATH]/selftest/suite_test cnf test_suite: DBG: reading suite.conf [test_suite↪test_suite] defaults: timeout: 60s @@ -16,6 +22,8 @@ resources: - times: '1' - run hello world test +cnf -: DBG: Found config file resources.conf as [PATH]/selftest/suite_test/resources.conf in ./suite_test which is [PATH]/selftest/suite_test +cnf -: DBG: Found path state_dir as [PATH]/selftest/suite_test/test_work/state_dir tst test_suite: Suite run start tst test_suite: reserving resources... tst test_suite: DBG: {combining='resources'} [test_suite↪test_suite] diff --git a/selftest/suite_test.ok.ign b/selftest/suite_test.ok.ign new file mode 100644 index 0000000..393ce95 --- /dev/null +++ b/selftest/suite_test.ok.ign @@ -0,0 +1 @@ +/[^ ]*/selftest/ [PATH]/selftest/ -- cgit v1.2.3