Skip to content

Commit

Permalink
show_subclassing.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
texadactyl committed Jan 30, 2025
1 parent bd8e10c commit 11ae69a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ jobs:
./src/jacotest -r 1 -j openjdk
./src/jacotest -r 2 -j openjdk
./src/jacotest -z -v -j openjdk
- name: Show subclassing in test cases
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
./show_subclassing.sh
fi
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This file is a version history of jacotest amendments. Entries appear in versio
| :------------: | :---: | :--- |
|<img width=90/>|<img width=60/>|<img width=600/>|
| 2025-01-30 | 3.5.5 | Updated ERROR_CATEGORIES.txt to prioritize reporting stack {under,over}flows. |
| | | Added show_subclassing.sh to gather subclassing information. |
| 2025-01-21 | 3.5.4 | Added more functions to test case atomic-integer. |
| 2025-01-16 | 3.5.3 | New test case: blocking-queues-2-3-5. |
| 2025-01-09 | 3.5.2 | New test case: iface-with-default-func. |
Expand Down
19 changes: 19 additions & 0 deletions show_subclassing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -e
set pipefail
MYNAME=`basename $0`

if [ ! -r VERSION.txt ]; then
echo '*** '$MYNAME': Wrong current directory!'
exit 86
fi

# Starting at ./tests,
# 1. Find all occurences of main.java and grep all "class" statements, keeping the file paths (-H) and ignoring case (-i).
# 2. From that, ignore case and throw out (-v) the "class main" statements.
# 3. From that, remove the directory prefix, yielding only the jacotest case (directory) name.
#
# 1 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 2 vvvvvvvvvvvvvvvvvvv 3 vvvvvvvvvvvvvvvvvvvvvv
echo
echo $MYNAME': Jacotest case files exhibiting subordinate classes (duplicate entries are possible):' 2>&1 | tee $MYNAME.log
echo 2>&1 | tee -a $MYNAME.log
find ./tests -name main.java -exec grep -iH " class " {} \; 2>&1 | grep -iv "class main" 2>&1 | sed -e "s/\.\/tests\///" 2>&1 | tee -a $MYNAME.log

0 comments on commit 11ae69a

Please sign in to comment.