File: test.sh

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (23 lines) | stat: -rwxr-xr-x 613 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
#!/bin/sh
set -e

${SUDO} halcompile --install userspace_count_names.comp

INSTALLED_FILE="${EMC2_HOME}/bin/userspace_count_names"
if [[ ! -f "${INSTALLED_FILE}" ]]; then
    echo "'halcompile --install' did not install '${INSTALLED_FILE}'"
    exit 1
fi

MODE=$(stat --printf '%#03a\n' "${INSTALLED_FILE}")
if [[ $((MODE & 0111)) == '0' ]]; then
    echo "installed file '${INSTALLED_FILE}' has incorrect permissions"
    echo "expected *some* execute bit, got ${MODE}"
    exit 1
fi

for HAL in *.hal; do
    echo "testing $HAL"
    BASE=$(basename $HAL .hal)
    halrun $HAL | tr ' ' '\n' >| $BASE.result
done