#!/bin/bash

set -eu

# for directory in pure-python cython shedskin
for directory in pure-python cython
do
    (cd "$directory" && make rcm-input-data)
done

(set -eu; echo py &&       cd pure-python && ../time-one py 2>&1   | sed -e '/^$/d' -e 's/^/    /')
(set -eu; echo pypy3 &&    cd pure-python && ../time-one pypy 2>&1 | sed -e '/^$/d' -e 's/^/    /')
(set -eu; echo cython &&   cd cython      && ../time-one pyx 2>&1  | sed -e '/^$/d' -e 's/^/    /')
# Shedskin's nice stuff, but it doesn't appear to be able to export a generator to CPython. So we skip it.
# (set -eu; echo shedskin && cd shedskin    && ../time-one ss 2>&1   | sed -e '/^$/d' -e 's/^/    /')