#!/bin/sh
set -eu
cd "$(dirname "$0")"
go version
go test ./...
go test -race ./...
go vet ./...
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o api .
./api --selftest
if readelf -l api | grep -q INTERP; then echo 'unexpected ELF interpreter'; exit 1; fi
echo 'ELF interpreter: absent'
python3 layer_demo.py
