sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
161 stars 191 forks source link

support.DirectoryStructure fails if logical path to build directory is a symlink #5102

Open wthrowe opened 1 year ago

wthrowe commented 1 year ago
test_checkpoints (__main__.TestDirectoryStructure) ... ok
test_segments (__main__.TestDirectoryStructure) ... FAIL

======================================================================
FAIL: test_segments (__main__.TestDirectoryStructure)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/wthrowe/spectre/tests/support/Python/Test_DirectoryStructure.py", line 62, in test_segments
    self.assertEqual(
AssertionError: Lists differ: [Segm[261 chars]ctre-work/tests/Unit/support/DirectoryStructur[19 chars]d=4)] != [Segm[261 chars]ctre-clang-debug-64/tests/Unit/support/Directo[29 chars]d=4)]

First differing element 2:
Segme[36 chars]ctre-work/tests/Unit/support/DirectoryStructur[18 chars]id=4)
Segme[36 chars]ctre-clang-debug-64/tests/Unit/support/Directo[28 chars]id=4)

  [Segment(path=PosixPath('/home/wthrowe/spectre-work/tests/Unit/support/DirectoryStructure/Segment_0000'),
           id=0),
   Segment(path=PosixPath('/home/wthrowe/spectre-work/tests/Unit/support/DirectoryStructure/Segment_0003'),
           id=3),
-  Segment(path=PosixPath('/home/wthrowe/spectre-work/tests/Unit/support/DirectoryStructure/Segment_0004'),
?                                                ^^^^

+  Segment(path=PosixPath('/home/wthrowe/spectre-clang-debug-64/tests/Unit/support/DirectoryStructure/Segment_0004'),
?                                                ^^^^^^^^^^^^^^

           id=4)]

----------------------------------------------------------------------
Ran 2 tests in 0.005s
$ pwd
/home/wthrowe/spectre-work
$ pwd -P
/home/wthrowe/spectre-clang-debug-64
nilsvu commented 1 year ago

Ok should be a matter of adding or removing resolve() from paths.