Skip to content
Snippets Groups Projects
Select Git revision
  • 1fedc25ebe291200917ebe7b2232635de1e3df99
  • develop default protected
  • feature/module-gpiod
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.1
  • 0.4.0
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.8
  • 0.2.7
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
23 results

server.py

Blame
  • test.sh 862 B
    #!/usr/bin/env bash
    set -e
    # only exit with zero if all commands of the pipeline exit successfully
    set -o pipefail
    
    # Make sure to use project tooling
    PATH="$(pwd)/tmp/bin:${PATH}"
    TESTFILE="$(pwd)/tmp/test.jsonnet"
    mkdir -p "$(pwd)/tmp"
    
    for i in examples/jsonnet-snippets/*.jsonnet; do
        [ -f "$i" ] || break
        echo "Testing: ${i}"
        echo ""
        fileContent=$(<"$i")
        snippet="local kp = $fileContent;
    
    $(<examples/jsonnet-build-snippet/build-snippet.jsonnet)"
        echo "${snippet}" > "${TESTFILE}"
        echo "\`\`\`"
        echo "${snippet}"
        echo "\`\`\`"
        echo ""
        jsonnet -J vendor "${TESTFILE}" > /dev/null
        rm -rf "${TESTFILE}"
    done
    
    for i in examples/*.jsonnet; do
        [ -f "$i" ] || break
        echo "Testing: ${i}"
        echo ""
        echo "\`\`\`"
        cat "${i}"
        echo "\`\`\`"
        echo ""
        jsonnet -J vendor "${i}" > /dev/null
    done