-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-test.sh
executable file
·43 lines (33 loc) · 1.06 KB
/
run-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# This is a quick test which (I guess) only runs in linux. We would need to
# create a proper container (Base cflinuxfs3) for proper testing
# Delete all folders to start fresh
rm -rf /tmp/buildpack/app /tmp/buildpack/deps/0
#rm -rf /tmp/buildpack/cache
mkdir -p /tmp/buildpack/app /tmp/buildpack/cache /tmp/buildpack/deps/0
echo ">> Running detect ..."
./bin/detect /tmp/buildpack/app
echo ">> Running supply ..."
./bin/supply /tmp/buildpack/app /tmp/buildpack/cache /tmp/buildpack/deps 0
echo ">> Running simulated app ..."
# From here, simulate running in a diego container (vector.sh)
export ROOT=/tmp/buildpack/app
export PATH=$PATH:/tmp/buildpack/deps/0/vector/bin
rm -rf /tmp/buildpack/app/vector
# Define variables here like in the manifest
export DEBUG=1
# No log destination, in order to force debug only
export LOG_DST=""
export VECTOR_OPTS="-v"
# run redirector
. $ROOT/.vector.sh
set +x
# App running logs
echo app starting
echo app error log >&2
echo app running
for ((i=60; i>=1; i--))
do
echo "My app is sending app log $i"
sleep 1
done