Skip to content

Commit

Permalink
Test extract turnin owner permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
innerout committed Nov 8, 2022
1 parent cf804a8 commit d2b0487
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ name: turnin test suite
on:
push:
paths:
- 'src/**'
- 'Makefile'
- '.github/workflows/main.yml'
- "src/**"
- "Makefile"
- ".github/workflows/main.yml"
- "scripts/**"
pull_request:
paths:
- 'src/**'
- 'Makefile'
- '.github/workflows/main.yml'
- "src/**"
- "Makefile"
- ".github/workflows/main.yml"
- "scripts/**"

env:
COURSE: hy999
Expand All @@ -36,4 +38,13 @@ jobs:
run: |
verify-turnin ex1@$COURSE
sudo -u $COURSE find /home/$COURSE/TURNIN/ex1/
sudo -u $COURSE find /home/$COURSE/TURNIN/ex1/ | grep `whoami` > /dev/null
sudo -u $COURSE find /home/$COURSE/TURNIN/ex1/ | grep `whoami` > /dev/null
- name: Verify extract turn in permissions
run: |
set -x
cp scripts/extract-turnins /home/$COURSE/TURNIN/ex1
cd /home/$COURSE/TURNIN/ex1
sudo -u $COURSE ./extract-turnins
FILE_PERMS=$(sudo -u $COURSE stat -L -c "%a %G %U" /home/$COURSE/TURNIN/ex1/runner/src/turnin.c | sudo -u $COURSE grep -o "600")
echo "$FILE_PERMS"
[ $FILE_PERMS -eq 600 ] || test $? -eq 0

0 comments on commit d2b0487

Please sign in to comment.