mirror of https://github.com/antmicro/sargraph.git
4 changed files with 91 additions and 86 deletions
@ -1,36 +1,19 @@
|
||||
image: debian:bullseye |
||||
|
||||
before_script: |
||||
- chmod +x scripts/install_dependencies.sh |
||||
- ./scripts/install_dependencies.sh |
||||
simple_test: |
||||
variables: |
||||
FAKE_DISK: "fake_disk.ext4" |
||||
FAKE_MOUNTPOINT: "fake_mountpoint" |
||||
script: |
||||
- chmod +x scripts/test.sh |
||||
- ./scripts/test.sh svg png ascii |
||||
artifacts: |
||||
when: always |
||||
paths: |
||||
- "*.svg" |
||||
- "*.png" |
||||
- "*.ascii" |
||||
- "*.txt" |
||||
- "*.log" |
||||
|
||||
interactive_plot_test: |
||||
variables: |
||||
FAKE_DISK: "fake_disk.ext4" |
||||
FAKE_MOUNTPOINT: "fake_mountpoint" |
||||
script: |
||||
- chmod +x scripts/test.sh |
||||
- ./scripts/test.sh html |
||||
artifacts: |
||||
when: always |
||||
paths: |
||||
- "*.txt" |
||||
- "*.log" |
||||
- "*.html" |
||||
- apt-get update |
||||
- apt-get install -qqy --no-install-recommends python3 python3-pip git |
||||
- pip3 install git+https://github.com/antmicro/tuttest.git |
||||
|
||||
|
||||
simple_test: |
||||
script: |
||||
- ./scripts/test.sh |
||||
artifacts: |
||||
when: always |
||||
paths: |
||||
- "*.svg" |
||||
- "*.png" |
||||
- "*.ascii" |
||||
- "*.html" |
||||
- "*.txt" |
||||
- "*.log" |
||||
|
||||
@ -1,6 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
apt -qqy update > /dev/null |
||||
apt -qqy install --no-install-recommends screen sysstat gnuplot-nox python3 python3-pip git stress coreutils > /dev/null |
||||
pip install -r requirements.txt |
||||
ln -s $(realpath sargraph.py) /usr/bin/sargraph |
||||
@ -1,38 +1,5 @@
|
||||
#!/bin/bash |
||||
|
||||
if [[ "$@" =~ 'html' ]] |
||||
then |
||||
pip install git+https://github.com/antmicro/servis#egg=servis[bokeh] |
||||
fi |
||||
set -e |
||||
|
||||
dd if=/dev/zero of=$FAKE_DISK bs=1M count=130 |
||||
mkfs.ext4 $FAKE_DISK |
||||
mkdir -p $FAKE_MOUNTPOINT && mount $FAKE_DISK $FAKE_MOUNTPOINT |
||||
|
||||
sargraph chart start -m $FAKE_MOUNTPOINT |
||||
|
||||
pushd $FAKE_MOUNTPOINT |
||||
df -h . |
||||
stress -c 16 -i 1 -m 1 --vm-bytes 512M -d 1 --hdd-bytes 70M -t 160s |
||||
|
||||
popd |
||||
|
||||
for ext in "$@" |
||||
do |
||||
sargraph chart save "plot.${ext}" |
||||
done |
||||
|
||||
sargraph chart stop |
||||
|
||||
for ext in "$@" |
||||
do |
||||
test -f "plot.${ext}" |
||||
done |
||||
|
||||
cat chart.log |
||||
|
||||
if [[ "$@" =~ 'ascii' ]] |
||||
then |
||||
echo '------Sample plot------' |
||||
cat plot.ascii |
||||
fi |
||||
tuttest README.md | grep -v '^\$' | bash - |
||||
|
||||
Loading…
Reference in new issue