File: runtest

package info (click to toggle)
mcu8051ide 1.4.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 18,820 kB
  • sloc: tcl: 94,956; xml: 2,122; sh: 2,113; asm: 246; ansic: 96; awk: 18; makefile: 5
file content (32 lines) | stat: -rwxr-xr-x 953 bytes parent folder | download | duplicates (3)
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
31
32
#! /bin/bash

# --------------------------------------------------------------------------
#
# MCU 8051 IDE assembler regression testing
#
# This script defines what and how is suppose to be tested and runs the tests.
# See README files for more information.
#
# --------------------------------------------------------------------------


## Prepare regression tests environment
source "$(dirname $0)/../rte.lib.sh"	# Load regression test environment
RTE_TEST_NAME="Assembler"		# Set name of the tested subject


readonly ASSEMBLER_COMMAND="tclsh ../../../lib/main.tcl --assemble"

function rte_before_test() {
	# Create symbolic link to the source code file
	ln -fs "../testcases/${1}.asm" . || return 1
}

function rte_perform_test() {
	$ASSEMBLER_COMMAND "${1}.asm" $(bash ../process_in_file "../testcases/${1}.in") --nocolor || return 1
}

function rte_after_test() {
	# Remove symbolic link to the source code file
	rm -f "${1}.asm" || return 1
}