singularity
singularity copied to clipboard
-run flag to go test does not work with e2e framework
Version of Singularity:
master
- Edit
Makefileto have-run TestHelp -varguments togo test
[vagrant@localhost singularity]$ SINGULARITY_E2E=1 make -C builddir e2e-test
make: Entering directory `/home/vagrant/singularity/builddir'
TEST sudo go test [e2e]
testing: warning: no tests to run
PASS
coverage: 0.0% of statements
ok github.com/sylabs/singularity/e2e 1.008s coverage: 0.0% of statements [no tests to run]
PASS
make: Leaving directory `/home/vagrant/singularity/builddir'
Does not work. I also tried using HELP, Help, and help. All resulted in testing: warning: no tests to run.
If you set the -run flag to TestE2E/HELP/TestHelp you can get the effect, but that's a lot to try and remember when you just want to test a single function
Hmmm... this one is hard.
The matching is done by code in the testing package. There's some generated code with the list of tests (those func TestFoo) in each of the packages under test. When you say -run or -list, that's the list that the resulting program looks at. Since E2E is written is a peculiar way, there are no other tests than the top level one, everything else is a subtest, and subtests have dynamic names and are therefore not discoverable at build time (when you run go test).
One way to fix this would be to make everything regular Go tests (func TestFoo(t *testing.T)). The problem with this is that E2E has a number of warts, with a significant amount of global state. This can be cleaned up, of course.
Hello,
This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.
Please consider the following:
- Is this issue a duplicate, or has it been fixed/implemented since being added?
- Is the issue still relevant to the current state of Singularity's functionality?
- Would you like to continue discussing this issue or feature request?
Thanks, Carter
This issue has been automatically marked as stale because it has not had activity in over 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
@jscook2345 Still getting this problem ? Have this been solved already ? If yes, what work around have you followed and applied ?
We're looking into the issue carefully, soon will bring to community and discuss ways to better solve as well address this. Thankyou for keeping the interest in the subject.
Transferred to the new Apptainer issue list https://github.com/apptainer/apptainer/issues/1154