1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/projects/test_suite/tests/03-mutex_trylock_fail

57 lines
785 B
Plaintext
Executable File

#!/usr/bin/expect
set timeout 5
spawn pseudoterm $env(PORT)
expect {
">$" {}
timeout { exit 1 }
}
send "start_test\n"
expect {
"\[TEST_START\]" {}
timeout { exit 1 }
}
expect {
">$" {}
timeout { exit 1 }
}
send "mutex_trylock_fail\n"
expect {
"main: locking mutex..." {}
timeout { exit 1 }
}
expect {
"main: creating thread..." {}
timeout { exit 1 }
}
expect {
"2nd: trying to lock mutex..." {}
timeout { exit 1 }
}
expect {
"2nd: done." {}
timeout { exit 1 }
}
expect {
"main: thread created. Unlocking mutex..." {}
timeout { exit 1 }
}
expect {
"main: mutex unlocked." {}
timeout { exit 1 }
}
send "end_test\n"
expect {
"\[TEST_END\]" {}
timeout { exit 1 }
}
puts "\nTest successful!\n"