Index

lognestmonster / 5693aae

A general-purpose single-header C logging library and parser for event-based logs. (Incomplete)

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
10911 Sep 2019 19:5878c6a12Drop Windows tests from Travis CIJosh Stockin1175N

Blob @ lognestmonster / test

text/x-shellscript632 bytesdownload raw
1#!/usr/bin/env bash
2
3mkdir -p bin
4
5call_python() {
6 python3 $@
7}
8
9good() {
10 echo -e "\033[92m${1}\033[0m"
11}
12
13bad() {
14 echo -e "\033[91m\033[7m${1}\033[0m"
15}
16
17warn() {
18 echo -e "\033[93m${1}\033[0m"
19}
20
21run() {
22 call_python $@
23 code=$?
24 if [ ${code} -ne 0 ]
25 then
26 bad "Error in test '${1}'. Exiting..."
27 exit ${code}
28 fi
29}
30
31run_tests() {
32 # Test prep (generate log files)
33 warn "Undergoing test preparations"
34 run ./tests/write.py ./bin/w1.lnm
35 run ./tests/write_many.py ./bin/w2.lnm 100
36 echo
37
38 # Unit tests
39 warn "Beginning unit tests"
40 run ./tests/unit_parserargs.py
41 echo
42
43 good "Finished! Exiting with code 0..."
44}
45
46run_tests
47