Skip to content
Snippets Groups Projects
Commit 71f112d4 authored by Moe Jette's avatar Moe Jette
Browse files

Augment test to work with BlueGene

parent 4d17522c
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,12 @@ if {$agg_time != 0} { ...@@ -136,6 +136,12 @@ if {$agg_time != 0} {
} }
#send_user "\nAuthKey=$auth_key\nEPort=$e_port\n" #send_user "\nAuthKey=$auth_key\nEPort=$e_port\n"
if { [test_bluegene] } {
set is_bluegene 1
} else {
set is_bluegene 0
}
# #
# Submit a job to work with # Submit a job to work with
# #
...@@ -147,7 +153,7 @@ make_bash_script $file_in " ...@@ -147,7 +153,7 @@ make_bash_script $file_in "
exit 123" exit 123"
set job_id1 0 set job_id1 0
set job_id2 0 set job_id2 0
set sbatch_pid [spawn $sbatch -N1-6 --output=$file_out --comment=test -t1 $file_in] set sbatch_pid [spawn $sbatch -N1-1024 --output=$file_out --comment=test -t1 $file_in]
expect { expect {
-re "Submitted batch job ($number)" { -re "Submitted batch job ($number)" {
set job_id1 $expect_out(1,string) set job_id1 $expect_out(1,string)
...@@ -174,7 +180,7 @@ set timeout 60 ...@@ -174,7 +180,7 @@ set timeout 60
exec $bin_rm -f $test_prog exec $bin_rm -f $test_prog
exec $bin_make -f /dev/null $test_prog exec $bin_make -f /dev/null $test_prog
set success 0 set success 0
set moab_pid [spawn $test_prog $auth_key $control_addr $e_port $job_id1 $sched_port] set moab_pid [spawn $test_prog $auth_key $control_addr $e_port $job_id1 $sched_port $is_bluegene]
set master_id $spawn_id set master_id $spawn_id
expect { expect {
-re "READY" { -re "READY" {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/* global variables */ /* global variables */
char *auth_key, *control_addr; char *auth_key, *control_addr;
int e_port, sched_port; int e_port, is_bluegene, sched_port;
long job_id; long job_id;
static int _conn_wiki_port(char *host, int port) static int _conn_wiki_port(char *host, int port)
...@@ -344,7 +344,7 @@ static void _notify_job(long my_job_id) ...@@ -344,7 +344,7 @@ static void _notify_job(long my_job_id)
snprintf(out_msg, sizeof(out_msg), snprintf(out_msg, sizeof(out_msg),
"TS=%u AUTH=root DT=CMD=NOTIFYJOB ARG=%ld " "TS=%u AUTH=root DT=CMD=NOTIFYJOB ARG=%ld "
"MSG=this is a test", "MSG=this_is_a_test",
(uint32_t) now, my_job_id); (uint32_t) now, my_job_id);
_xmit(out_msg); _xmit(out_msg);
} }
...@@ -396,9 +396,9 @@ static void _initialize(void) ...@@ -396,9 +396,9 @@ static void _initialize(void)
int main(int argc, char * argv[]) int main(int argc, char * argv[])
{ {
if (argc < 4) { if (argc < 6) {
printf("Usage: %s, auth_key control_addr e_port " printf("Usage: %s, auth_key control_addr e_port "
"job_id sched_port\n", argv[0]); "job_id sched_port is_bluegene\n", argv[0]);
exit(1); exit(1);
} }
...@@ -407,20 +407,24 @@ int main(int argc, char * argv[]) ...@@ -407,20 +407,24 @@ int main(int argc, char * argv[])
e_port = atoi(argv[3]); e_port = atoi(argv[3]);
job_id = atoi(argv[4]); job_id = atoi(argv[4]);
sched_port = atoi(argv[5]); sched_port = atoi(argv[5]);
printf("auth_key=%s control_addr=%s e_port=%d job_id=%d sched_port=%d\n", is_bluegene = atoi(argv[6]);
auth_key, control_addr, e_port, job_id, sched_port); printf("auth_key=%s control_addr=%s e_port=%d job_id=%d sched_port=%d "
"is_bluegene=%d\n",
auth_key, control_addr, e_port, job_id, sched_port, is_bluegene);
_initialize(); _initialize();
_get_jobs(); _get_jobs();
_get_nodes(); _get_nodes();
_job_will_run(job_id); _job_will_run(job_id);
_modify_job(job_id); _modify_job(job_id);
/* _notify_job(65544); */
_get_jobs(); _get_jobs();
_start_job(job_id); _start_job(job_id);
_get_jobs(); _get_jobs();
_suspend_job(job_id); if (!is_bluegene) {
_resume_job(job_id); _suspend_job(job_id);
_resume_job(job_id);
}
_notify_job(job_id);
_signal_job(job_id); _signal_job(job_id);
if (e_port) if (e_port)
_event_mgr(); _event_mgr();
......
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