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 5, 2022
1 parent cf804a8 commit 9d1b1c9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ on:
- 'src/**'
- 'Makefile'
- '.github/workflows/main.yml'
- 'scripts/**'
pull_request:
paths:
- 'src/**'
- 'Makefile'
- '.github/workflows/main.yml'

- 'scripts/**'
env:
COURSE: hy999

Expand All @@ -36,4 +37,12 @@ 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: |
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 | grep -o "600")
echo "$FILE_PERMS"
[ $FILE_PERMS -eq 600 ] || test $? -eq 0

0 comments on commit 9d1b1c9

Please sign in to comment.