#!/bin/bash
. ./env.txt
tests="http_api http_304 ldap_core ldap \
admin_set_web git_big_push admin_set_git by_http wh_lambda http_keys \
http_forgot \
api wh_cloud pr_anon wh_http ssh http_totp totp git_log1 \
http_admin http_bug http_confirm \
http_create_account http_login http_settings http_csrf http_top \
token util log state cache prof event rights keys user repo git \
bug hook_update git2 source"
ts=`date +%s`
failed=""
add=""
for t in ${tests}; do
if [ -r "state/${t}" ]; then
continue
fi
echo -n "${t}: "
s=`date +%s`
if [ -r "${t}.sh" ]; then
./${t}.sh
else
php ${t}.php
fi &> "${t}.out"
E=${?}
e=`date +%s`
diff=$((${e} - ${s}))
if [ "${E}" != "0" ]; then
failed="${failed}${add}${t}"
add=" "
echo -n "FAIL"
else
touch "state/${t}"
echo -n "OK"
fi
echo " (${diff}s)"
done
te=`date +%s`
tdiff=$((${te} - ${ts}))
echo "${failed}" > _run_tests.failed
echo
errs=`ls err-* /var/log/rocketgit/err-* 2>/dev/null`
echo "Total time: ${tdiff}s"
if [ "${failed}${errs}" = "" ]; then
echo "All OK! Good work!"
exit 0
fi
if [ "${failed}" != "" ]; then
echo "One or more tests failed: ${failed}"
else
echo "All tests passed."
fi
if [ "${errs}" != "" ]; then
echo "We have some errors: ${errs}"
fi
exit 1
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master