From c3edb7511a20970894fad81e647a8dabe5e5bac9 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Thu, 16 Aug 2018 18:36:36 +0200 Subject: tests: make top output independent of username, which could be too long --- test/environment/nice.exp | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'test') diff --git a/test/environment/nice.exp b/test/environment/nice.exp index b989ea37a..9a7e2e9f7 100755 --- a/test/environment/nice.exp +++ b/test/environment/nice.exp @@ -14,11 +14,7 @@ expect { } sleep 1 -send -- "top -b -n 1\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - $env(USER) -} +send -- "top -b -n 1 | awk '{ print \$4, \$12 }'\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "15" @@ -27,10 +23,6 @@ expect { timeout {puts "TESTING ERROR 3\n";exit} "bash" } -expect { - timeout {puts "TESTING ERROR 4\n";exit} - $env(USER) -} expect { timeout {puts "TESTING ERROR 5\n";exit} "15" @@ -51,11 +43,7 @@ expect { } sleep 1 -send -- "top -b -n 1\r" -expect { - timeout {puts "TESTING ERROR 11\n";exit} - $env(USER) -} +send -- "top -b -n 1 | awk '{ print \$4, \$12 }'\r" expect { timeout {puts "TESTING ERROR 12\n";exit} "15" @@ -64,10 +52,6 @@ expect { timeout {puts "TESTING ERROR 13\n";exit} "bash" } -expect { - timeout {puts "TESTING ERROR 14\n";exit} - $env(USER) -} expect { timeout {puts "TESTING ERROR 15\n";exit} "15" @@ -90,11 +74,7 @@ expect { } sleep 1 -send -- "top -b -n 1\r" -expect { - timeout {puts "TESTING ERROR 18\n";exit} - $env(USER) -} +send -- "top -b -n 1 | awk '{ print \$4, \$12 }'\r" expect { timeout {puts "TESTING ERROR 19\n";exit} "0" @@ -103,10 +83,6 @@ expect { timeout {puts "TESTING ERROR 20\n";exit} "bash" } -expect { - timeout {puts "TESTING ERROR 21\n";exit} - $env(USER) -} expect { timeout {puts "TESTING ERROR 22\n";exit} "0" -- cgit v1.2.3-54-g00ecf