Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
cse4302/pa4/assemble_all.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (20 sloc)
718 Bytes
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
#!/bin/bash | |
# This script is privided to you to assemble all unit tests for you. | |
# 1) First ensure that that your assembler is compiled | |
# 2) Then, run "$ bash assemble_all.sh". | |
# A new directory "assembled tests will be generated, populated with all the binary tests. | |
# Note: "$ make clean" will remove these tests | |
if [ ! -d assembled_tests ]; then | |
echo "Creating \"assembled_tests\" directory..." | |
mkdir assembled_tests | |
fi | |
if [ ! -f ../assembler/assembler ]; then | |
echo "Error: Assembler is not compiled." | |
exit | |
fi | |
for test in unittests/*.asm; do | |
echo "Assembling test \"$test\"..." | |
testname=$(basename $test .asm) | |
../assembler/assembler $test assembled_tests/$testname.out > /dev/null 2>&1 | |
done | |
echo "Done!" |