Project

General

Profile

Actions

Bug #22506

closed

Fix run-tests.sh to accept WORKSPACE=... on command line

Added by Tom Clegg about 1 month ago. Updated 18 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Story points:
0.5
Release relationship:
Auto

Description

In #22428 we accidentally lost the (advertised) ability to run run-tests.sh like this

./build/run-tests.sh WORKSPACE="$(pwd)" --interactive

Instead of doing the expected thing, it gives lots of hints that's working but then can't run any tests because $gostuff and $testfuncargs aren't set properly.

What next? test lib/controller/localdb
./build/run-tests.sh: line 467: skip: bad array subscript
./build/run-tests.sh: line 467: skip: bad array subscript
Starting API, controller, keepproxy, keep-web, ws, and nginx ssl proxy...
api pid 2287217 ok
...
======= test
./build/run-tests.sh: line 578: test_: command not found
=======  tests -- FAILED
======= test  -- 0s
Pass: sdk/python install (1s)
Failures (1):
Fail:  tests (0s)
What next? 

Subtasks 1 (0 open1 closed)

Task #22507: Review 22506-workspace-argResolvedTom Clegg02/03/2025Actions
Actions #1

Updated by Tom Clegg about 1 month ago

  • Subject changed from Fix run-test.sh to accept WORKSPACE=... on command line to Fix run-tests.sh to accept WORKSPACE=... on command line
Actions #2

Updated by Tom Clegg about 1 month ago

  • Subtask #22507 added
Actions #3

Updated by Brett Smith about 1 month ago

I'm not disputing this is a regression, but: you can already do this as long as you write WORKSPACE (and any other variables) before the start of the command proper, e.g.,

WORKSPACE="$PWD" build/run-tests.sh ...

Do we really need code to reimplement a feature the shell already has? Could we just make this the documented way?

Actions #4

Updated by Tom Clegg about 1 month ago

Sure. I guess if anyone else uses this to set WORKSPACE they will figure out easily enough how to fix it.

I've updated Running tests, since setting WORKSPACE the normal way already worked.

In this version I've made envvar=val an error, and updated the help text. I retained the ability to set ARVADOS_* vars via command line, because (I suppose) we still want the "scrub ARVADOS_*" bit that isolates the tests from any [real] arvados env vars that happen to be set.

22506-workspace-arg @ 9ae1dc73ecc5fc2aa30594c5d66216bcfde8a0db -- developer-run-tests: #4636

Actions #5

Updated by Tom Clegg about 1 month ago

updated jenkins config (https://ci.arvados.org/view/Developer/job/run-tests-doc-pysdk-api-fuse/configure) to use export sdks=python instead of a command line arg.

22506-workspace-arg @ 9ae1dc73ecc5fc2aa30594c5d66216bcfde8a0db -- developer-run-tests: #4639

Actions #6

Updated by Brett Smith about 1 month ago

Tom Clegg wrote in #note-5:

updated jenkins config (https://ci.arvados.org/view/Developer/job/run-tests-doc-pysdk-api-fuse/configure) to use export sdks=python instead of a command line arg.

Re-configured it to remove the export and pass an argument doc_test="sdks=python" instead, to limit scope and help make clearer what it's for. run-tests-doc-pysdk-api-fuse: #660 — you can see it build the Python SDK, and only that SDK, in the "test doc" section.

Analogously reconfigured developer-run-tests-sdk-java-R.

22506-workspace-arg @ 9ae1dc73ecc5fc2aa30594c5d66216bcfde8a0db -- developer-run-tests: #4639

LGTM, thanks.

Actions #7

Updated by Tom Clegg about 1 month ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados-private:commit:arvados|097f9ce4a04078f9dbc7aaa95169216ceedea715.

Actions #8

Updated by Peter Amstutz 18 days ago

  • Release set to 75
Actions

Also available in: Atom PDF