nf-test icon indicating copy to clipboard operation
nf-test copied to clipboard

Automatic staging of `assets` `bin` and `lib` folders broken

Open koenbossers opened this issue 1 year ago • 2 comments

Hi! I have issues with automatic staging of the bin, assets and lib folders in nf-test 0.8.3. The symlink in the working directory is broken.

Minimal working example in https://github.com/koenbossers/nftest_issue_staging

On MacOS and Linux:

  • nextflow run main.nf works ✅
  • nf-test test tests/main.nf.test works for nf-test version 0.7.3
  • nf-test test tests/main.nf.test is broken for nf-test version 0.8.3

Concrete error:

🚀 nf-test 0.8.3
https://code.askimed.com/nf-test
(c) 2021 - 2023 Lukas Forer and Sebastian Schoenherr


Test Workflow main.nf

  Test [f6f0f9d7] 'Should run without failures' FAILED (1.897s)

  Assertion failed:

  assert workflow.success
         |        |
         workflow false

  Nextflow stdout:

  /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/assets/hi_from_assets.txt
  /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/bin/hi_from_bin.txt
  /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/lib/hi_from_lib.txt
  ERROR ~ Error executing process > 'showFileContents (3)'

  Caused by:
    Process `showFileContents (3)` terminated with an error exit status (1)

  Command executed:

    cat hi_from_lib.txt

  Command exit status:
    1

  Command output:
    (empty)

  Command error:
    cat: hi_from_lib.txt: No such file or directory

  Work dir:
    /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/work/b4/f6367111247562b4fcaf9c455e921

Looking in the work directory, the symlink points to a non-existing file. There is a meta folder missing in the symlink:

$ ls -l /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/work/dc/6001adb2ce8c7919ad6b18eb18b60f/
total 0
lrwxr-xr-x 1 koen staff 110 Jan 30 13:18 hi_from_lib.txt -> /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/lib/hi_from_lib.txt

# The linked file does not exist
$ ls /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/lib/hi_from_lib.txt
ls: cannot access '/Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/lib/hi_from_lib.txt': No such file or directory

# The file does however live here:
$ ls /Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/meta/lib/hi_from_lib.txt
/Users/koen/CODING/bugreport_nftest_assets/.nf-test/tests/f6f0f9d722cfcaaa18e90c500ace8aba/meta/lib/hi_from_lib.txt

koenbossers avatar Jan 30 '24 12:01 koenbossers

Thanks! I will look into it later this week.

lukfor avatar Jan 31 '24 10:01 lukfor