Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clash-testsuite: dependencies in sequentialTestGroup wrong #2516

Closed
DigitalBrains1 opened this issue Jun 21, 2023 · 3 comments
Closed

clash-testsuite: dependencies in sequentialTestGroup wrong #2516

DigitalBrains1 opened this issue Jun 21, 2023 · 3 comments
Assignees

Comments

@DigitalBrains1
Copy link
Member

DigitalBrains1 commented Jun 21, 2023

It seems that the dependency resolution of the new Tasty test structure is somehow bugged. For instance, it would appear that Vivado VHDL tests pick GHDL as their dependency instead of clash (gen):

$ cabal run clash-testsuite -- -j8 -p Calculator.VHDL.Vivado -l
Up to date
..examples.Calculator.VHDL.GHDL.ghdl (import testBench)
..examples.Calculator.VHDL.GHDL.ghdl (make testBench)
..examples.Calculator.VHDL.GHDL.ghdl (sim testBench)
..examples.Calculator.VHDL.Vivado.vivado (sim testBench)

and indeed:

$ cabal run clash-testsuite -- -j8 -p Calculator.VHDL.Vivado
Up to date
.
  examples
    Calculator
      VHDL
        GHDL
          ghdl (import testBench): FAIL
            Exception: /tmp/clash-test-8f7246e8d30587e8/hdl: getDirectoryContents:openDirStream: does not exist (No such file or directory)
            Use -p '/Calculator.VHDL.Vivado/&&/ghdl (import testBench)/' to rerun this test only.
          ghdl (make testBench):   SKIP
            
            Use -p '/Calculator.VHDL.Vivado/&&/ghdl (make testBench)/' to rerun this test only.
          ghdl (sim testBench):    SKIP
            
            Use -p '/Calculator.VHDL.Vivado/&&/ghdl (sim testBench)/' to rerun this test only.
        Vivado
          vivado (sim testBench):  SKIP
            
            Use -p '/Calculator.VHDL.Vivado/&&/vivado (sim testBench)/' to rerun this test only.

4 out of 4 tests failed (0.03s)

It runs GHDL without clash (gen) and then SKIPs also Vivado because ghdl (import testBench) was FAIL.

This works (but runs GHDL as well):

$ cabal run clash-testsuite -- -j8 -p '/Calculator.VHDL.Vivado/ || /Calculator.VHDL.clash (gen)/'
Up to date
.
  examples
    Calculator
      VHDL
        clash (gen):               OK (2.37s)
        GHDL
          ghdl (import testBench): OK
          ghdl (make testBench):   OK (0.48s)
          ghdl (sim testBench):    OK
        Vivado
          vivado (sim testBench):  OK (17.01s)

All 5 tests passed (19.91s)

I'm going to guess that Vivado doesn't start until GHDL has completed, even though they should have launched in parallel. I didn't monkey patch anything to verify that guess.

@martijnbastiaan
Copy link
Member

We suspect this PR introducing the issue: #2284.

@DigitalBrains1
Copy link
Member Author

DigitalBrains1 commented Jun 22, 2023

I'm actually sure it is; it was what I was going for with "the new Tasty test structure", but a PR number is definitely the better way to refer to it.

Before that, dependencies also didn't work, but this was a known deficiency. Starting with that PR, it ought to have worked.

@martijnbastiaan
Copy link
Member

This issue turned out to be partly caused by Tasty, fixed over here: UnkindPartition/tasty#376. The other half of the issue is that we really did have false dependencies in our testsuite.

NadiaYvette pushed a commit to NadiaYvette/clash-compiler that referenced this issue Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants