Skip to content
Snippets Groups Projects
Commit 169800bf authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Modify tests to support new option syntax.

Add --usage to sattach to quiet test16.1.
parent deccee52
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
......@@ -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)
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment