tools/tests/test_publish_quest_apk.py and test_release_quest_apk.py fail: run-root refuses, with no work root set

Open
#2,883 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
git, python, shell
Domain
testing, tooling

Research direction

Read tools/run_tool_tests.py and the run-root calls in tools/tests/test_publish_quest_apk.py and tools/tests/test_release_quest_apk.py to see which checkout the make command uses and how its environment is set. First run both files with NEVR_RUNTIME_WORK_ROOT pointing to a scratch directory; the issue reports that this makes them pass. Then make the test or run-root call set the work root, and confirm both files pass.

Written by the indexing model from the issue text.

Description

backlog bug

Evidence at d082ef2e3

  • A run of the two files in the release-base worktree: python3 tools/run_tool_tests.py tools/tests/test_publish_quest_apk.py tools/tests/test_release_quest_apk.py gives 15 failed, 98 passed (exit 1) in the base log. The base's test_publish_quest_apk.py accounts for 14 of the failures and test_release_quest_apk.py for 1 (its test at tools/tests/test_release_quest_apk.py:71).
  • Each failure's assertion names the same cause. The base log has 11 lines of work_root.RunRootRefused: run-root make publish-quest-apk: run-root: NEVR_RUNTIME_WORK_ROOT is not set and this is not a git checkout, so there is no default work root: set NEVR_RUNTIME_WORK_R... (read with grep -a on the log).
  • The same two files fail the same way on the branch tip (the quick check of tree 6beeef24: pytest:test_publish_quest_apk (exit 1), pytest:test_release_quest_apk (exit 1)).

Not shown

  • Why the test's make runs outside a git checkout while the test runs in one. The run-root tool decides the work root from the checkout it is started in; the test's copy or environment is not read here.
  • Whether these two files ever passed on the release line.

Falsifier

Both files pass with NEVR_RUNTIME_WORK_ROOT set to a scratch directory in the environment of the run. If they still fail with it set, the cause is not the work root.

Work

  1. Read tools/run_tool_tests.py and the test's run-root call. Find which checkout the make runs in and what it sees for the work root.
  2. Test first: run the two files with NEVR_RUNTIME_WORK_ROOT set to a scratch directory, and record the result. The falsifier decides whether the rest of the steps apply.
  3. Make the test set its work root (or the run-root call pass one) so the make runs in a directory where the default is defined. Both files then pass.
Dominant language
C++
Stars
3
Forks
5
Avg merge
4h 37m
Merged PRs (30d)
524

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.