Skip to content

Commit

Permalink
workflow: fix incorrect files number for optimizer test
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
  • Loading branch information
sctb512 committed Jun 15, 2023
1 parent 9f861ec commit c803848
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/optimizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ jobs:
sudo systemctl restart containerd
- name: Generate accessed files list
run: |
sed -i "s|host_path: script|host_path: $(pwd)/misc/optimizer/script|g" misc/optimizer/nginx.yaml
sudo crictl run misc/optimizer/nginx.yaml misc/optimizer/sandbox.yaml
sleep 20
sudo crictl rmp -f --all
tree /opt/nri/optimizer/results/
count=$(cat /opt/nri/optimizer/results/library/nginx:1.23.3 | wc -l)
echo $count
if [ "$count" != 44 ]; then
if [ $count != 20 ]; then
echo "failed to generate accessed files list for nginx:1.23.3"
exit 1
fi
cat /opt/nri/optimizer/results/library/nginx:1.23.3.csv
cat /opt/nri/optimizer/results/library/nginx:1.23.3.csv
10 changes: 10 additions & 0 deletions misc/optimizer/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,15 @@ metadata:
image:
image: nginx:1.23.3

mounts:
- host_path: script
container_path: /script

command:
- /script/entrypoint.sh

args:
- /script/file_list.txt

log_path: nginx.0.log
linux: {}

0 comments on commit c803848

Please sign in to comment.