-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test different generate-type modes outputs #589
- Loading branch information
1 parent
c055641
commit 23385be
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# check that the number of files in both directories is equal | ||
count1=$(find "$1" -type f | wc -l) | ||
count2=$(find "$2" -type f | wc -l) | ||
|
||
if [ "$count1" -eq "$count2" ]; then | ||
echo "The number of files in both directories is equal." | ||
else | ||
echo "The number of files differs: $1 has $count1 files, $2 has $count2 files." | ||
exit 1 | ||
fi | ||
|
||
# Check that both directories contain identical list of files | ||
diff -qr "$1" "$2" | grep 'Only in' && exit 1 | ||
echo "Both directories contain files with the same names." | ||
|
||
diff -r "$1" "$2" | ||
if [ $? -ne 0 ]; then | ||
exit 1 | ||
fi | ||
echo "Comparison completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SRC_DIR="build/examples/cpp" | ||
DEST_DIR="$1" | ||
|
||
if [ ! -d "$DEST_DIR" ]; then | ||
mkdir -p "$DEST_DIR" | ||
fi | ||
|
||
find "$SRC_DIR" -type f -name "*.crct*" -exec cp {} "$DEST_DIR" \; | ||
find "$SRC_DIR" -type f -name "*.tbl*" -exec cp {} "$DEST_DIR" \; | ||
|
||
echo "All .crct and .tbl files have been copied from $SRC_DIR to $DEST_DIR." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rm -r build/examples/cpp | ||
/usr/bin/cmake --build "$(pwd)/build" --config Debug --target cpp_examples_generate_tbl -- | ||
/usr/bin/cmake --build "$(pwd)/build" --config Debug --target cpp_examples_generate_crct -- | ||
bash tests/copy_assigner_outputs.sh build/1 | ||
/usr/bin/cmake --build "$(pwd)/build" --config Debug --target cpp_examples_generate_crct -- | ||
bash tests/copy_assigner_outputs.sh build/2 | ||
|
||
bash tests/compare_folders_content.sh build/1 build/2 |