nixos/tests/gnome3.nix: Speed up test

It turns out that "journalctl -f | grep -m 1 pattern" will block for
one more line after "pattern" appears, which can take a long time.

+1 -1
+1 -1
nixos/tests/gnome3.nix
··· 29 29 $machine->succeed("su - alice -c 'DISPLAY=:0.0 gnome-terminal &'"); 30 30 $machine->succeed("xauth merge ~alice/.Xauthority"); 31 31 $machine->waitForWindow(qr/Terminal/); 32 - $machine->mustSucceed("timeout 900 bash -c 'journalctl -f|grep -m 1 \"GNOME Shell started\"'"); 32 + $machine->succeed("timeout 900 bash -c 'while read msg; do if [[ \$msg =~ \"GNOME Shell started\" ]]; then break; fi; done < <(journalctl -f)'"); 33 33 $machine->sleep(10); 34 34 $machine->screenshot("screen"); 35 35 '';