helper/bwrap: check args only for internal tests
Tests internal to the helper package sets crash-test-dummy as the command whenever a launch is expected to go through, and the hardcoded args are only valid for internal tests, so this characteristic is used here to exclude external tests that pass real program names and custom bwrap configurations. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
parent
7c7999e9e5
commit
c201c30c7f
|
@ -160,7 +160,7 @@ func bwrapStub(argsFD, statFD *int) {
|
|||
panic("cannot read want: " + err.Error())
|
||||
}
|
||||
|
||||
if got.String() != want.String() {
|
||||
if len(flag.CommandLine.Args()) > 0 && flag.CommandLine.Args()[0] == "crash-test-dummy" && got.String() != want.String() {
|
||||
panic("bad bwrap args\ngot: " + got.String() + "\nwant: " + want.String())
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue