More filtering for tests

This commit is contained in:
David Dworken 2022-11-12 18:46:30 -08:00
parent 86adcb64f6
commit 7005e15b15
No known key found for this signature in database

View File

@ -135,7 +135,7 @@ const (
Offline Offline
) )
func TestParameterized(t *testing.T) { func TestP(t *testing.T) {
if skipSlowTests() { if skipSlowTests() {
shellTesters = shellTesters[:1] shellTesters = shellTesters[:1]
} }
@ -1235,7 +1235,7 @@ func testInstallViaPythonScript(t *testing.T, tester shellTester) {
// And test that it recorded that command // And test that it recorded that command
time.Sleep(time.Second) time.Sleep(time.Second)
out = tester.RunInteractiveShell(t, `hishtory export | grep -v pipefail`) out = tester.RunInteractiveShell(t, `hishtory export -pipefail`)
if out != "hishtory status\n" { if out != "hishtory status\n" {
t.Fatalf("unexpected output from hishtory export=%#v", out) t.Fatalf("unexpected output from hishtory export=%#v", out)
} }
@ -2397,7 +2397,7 @@ func fuzzTest(t *testing.T, tester shellTester, input string) {
keyToCommands[op.device.key] = val keyToCommands[op.device.key] = val
// Run hishtory export and check the output // Run hishtory export and check the output
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export | grep -v export`) out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export -export -pipefail`)
testutils.Check(t, err) testutils.Check(t, err)
expectedOutput := keyToCommands[op.device.key] expectedOutput := keyToCommands[op.device.key]
if diff := cmp.Diff(expectedOutput, out); diff != "" { if diff := cmp.Diff(expectedOutput, out); diff != "" {
@ -2408,7 +2408,7 @@ func fuzzTest(t *testing.T, tester shellTester, input string) {
// Check that hishtory export has the expected results // Check that hishtory export has the expected results
for _, op := range ops { for _, op := range ops {
switchToDevice(&devices, op.device) switchToDevice(&devices, op.device)
out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export | grep -v export`) out, err := tester.RunInteractiveShellRelaxed(t, `hishtory export -export -pipefail`)
testutils.Check(t, err) testutils.Check(t, err)
expectedOutput := keyToCommands[op.device.key] expectedOutput := keyToCommands[op.device.key]
if diff := cmp.Diff(expectedOutput, out); diff != "" { if diff := cmp.Diff(expectedOutput, out); diff != "" {