|
@@ -590,6 +590,8 @@ jat__sinit() {
|
590
|
590
|
# Load active session if found; otherwise initialize new one.
|
591
|
591
|
#
|
592
|
592
|
local reload=false
|
|
593
|
+ local old_test_id
|
|
594
|
+ local old_test_version
|
593
|
595
|
mkdir -p "$JAT__DIR" \
|
594
|
596
|
|| die "could not initialize JAT__DIR: $JAT__DIR"
|
595
|
597
|
__JAT__SDIR=$JAT__DIR/session
|
|
@@ -600,6 +602,16 @@ jat__sinit() {
|
600
|
602
|
export JAT__YLOG
|
601
|
603
|
debug -v reload __JAT__SDIR
|
602
|
604
|
if $reload; then
|
|
605
|
+ old_test_id=$(__jat__sd_keyr test_id)
|
|
606
|
+ old_test_version=$(__jat__sd_keyr test_version)
|
|
607
|
+ test "$old_test_id" == "$JAT__TEST_ID" || {
|
|
608
|
+ warn -v JAT__TEST_ID old_test_id
|
|
609
|
+ die "cannot reload session of different test"
|
|
610
|
+ }
|
|
611
|
+ test "$old_test_version" == "$JAT__TEST_VERSION" || {
|
|
612
|
+ warn -v JAT__TEST_VERSION old_test_version
|
|
613
|
+ die "cannot reload session of different test version"
|
|
614
|
+ }
|
603
|
615
|
__jat__log_event SINFO "reloaded session" "" \
|
604
|
616
|
-- \
|
605
|
617
|
"JAT__LOG_FMT=$__JAT__LOG_FMT" \
|
|
@@ -617,6 +629,8 @@ jat__sinit() {
|
617
|
629
|
echo "start: $(__jat__newstamp)"
|
618
|
630
|
echo "events:"
|
619
|
631
|
} | __jat__writelog
|
|
632
|
+ __jat__sd_keyw test_id "$JAT__TEST_ID"
|
|
633
|
+ __jat__sd_keyw test_version "$JAT__TEST_VERSION"
|
620
|
634
|
__jat__pdummy
|
621
|
635
|
__jat__log_event SINFO "started new session"
|
622
|
636
|
__jat__show_sinitn
|