summaryrefslogtreecommitdiffstats
path: root/tests/800-coreserver/coreserver-cli.sh
blob: 212d93b52692dcb61c2cab6d0cf224538f5ef6fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# awlsim-test with coreserver tests

sh_test()
{
	local interpreter="$1"

	infomsg
	infomsg "--- Running coreserver tests"
	cd "$rootdir" || die "Failed to change to rootdir '$rootdir'"

	for testfile in 000-base/shutdown.awl \
			000-base/EXAMPLE.awlpro; do
		run_test "$interpreter" "$basedir/$testfile" \
			--spawn-backend --interpreter "$interpreter" \
			--connect-to localhost:$(get_port)
	done

	infomsg "----- Testing MemoryArea accesses"
	run_test "$interpreter" "$basedir/000-base/EXAMPLE.awlpro" \
		--spawn-backend --interpreter "$interpreter" \
		--connect-to localhost:$(get_port) \
		--mem-read E:1:8 --mem-read A:2:16 --mem-read M:3:32 \
		--mem-read L:4:8 --mem-read DB:1:5:16 --mem-read T:10 \
		--mem-read Z:10 --mem-read STW \
		--mem-write E:50:8:1 --mem-write A:51:16:2 --mem-write M:52:32:3 \
		--mem-write DB:1:5:16:5 --mem-write T:0:0 \
		--mem-write Z:1:0

	infomsg -n "--- Finished coreserver tests "
}
bues.ch cgit interface