From 169800bf47e521781758fbabc1c2276143eb24e9 Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" <morrone2@llnl.gov> Date: Tue, 29 Aug 2006 21:03:19 +0000 Subject: [PATCH] Modify tests to support new option syntax. Add --usage to sattach to quiet test16.1. --- src/sattach/opt.c | 14 +++++++++----- testsuite/expect/test17.7 | 2 +- testsuite/expect/test18.10 | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/sattach/opt.c b/src/sattach/opt.c index a537aa0bb99..4981733be67 100644 --- a/src/sattach/opt.c +++ b/src/sattach/opt.c @@ -239,12 +239,13 @@ void set_options(const int argc, char **argv) int opt_char, option_index = 0; static struct option long_options[] = { {"help", no_argument, 0, 'h'}, - {"quiet", no_argument, 0, 'Q'}, + {"quiet", no_argument, 0, 'q'}, + {"usage", no_argument, 0, 'u'}, {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {NULL} }; - char *opt_string = "+hQvV"; + char *opt_string = "+hquvV"; opt.progname = xbasename(argv[0]); optind = 0; @@ -260,9 +261,12 @@ void set_options(const int argc, char **argv) case 'h': _help(); exit(0); - case 'Q': + case 'q': opt.quiet++; break; + case 'u': + _usage(); + exit(0); case 'v': opt.verbose++; break; @@ -391,8 +395,8 @@ static void _help(void) printf( "Help options:\n" -" -h, --help show this help message\n" -" --usage display brief usage message\n" +" -h, --help show this help message\n" +" -u, --usage display brief usage message\n" "\n" "Other options:\n" " -V, --version output version information and exit\n" diff --git a/testsuite/expect/test17.7 b/testsuite/expect/test17.7 index 9f2f3d08e5b..f24c924aa8c 100755 --- a/testsuite/expect/test17.7 +++ b/testsuite/expect/test17.7 @@ -53,7 +53,7 @@ make_bash_script $file_in " # Submit a slurm job that will execute 'pwd' # set job_id 0 -spawn $sbatch -N1 --output=$file_out --chdir=$tmp_dir -t1 $file_in +spawn $sbatch -N1 --output=$file_out --workdir=$tmp_dir -t1 $file_in expect { -re "Submitted batch job ($number)" { set job_id $expect_out(1,string) diff --git a/testsuite/expect/test18.10 b/testsuite/expect/test18.10 index b0d25625b3d..f0e5167c117 100755 --- a/testsuite/expect/test18.10 +++ b/testsuite/expect/test18.10 @@ -78,7 +78,7 @@ expect { # set job_id 0 set matches 0 -spawn $salloc -t1 -v $slaunch --slaunch-error=none -t1 $bin_sleep aaa +spawn $salloc -t1 -v $slaunch --task-error=/dev/null $bin_sleep aaa expect { -re "Pending job allocation ($number)" { set job_id $expect_out(1,string) -- GitLab