Skip to content

Commit

Permalink
Add realpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekcyjna committed Feb 18, 2024
1 parent d04d5b4 commit c3730d8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion util/pure_concolic_execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ while getopts "i:o:" opt; do
esac
done
shift $((OPTIND-1))
target=$@
target=("$@")
target[0]=$(realpath "${target[0]}")
target="${target[@]}"
timeout="timeout -k 5 90"

if [[ ! -v in ]]; then
Expand Down Expand Up @@ -82,6 +84,16 @@ function maybe_export() {
fi
}

function remove_analysed() {
local source_dir="$1"
local f
for f in $source_dir/*; do
if grep -q "$(basename $f)" $work_dir/analyzed_inputs; then
rm $f
fi
done
}

# Copy those files from the input directory to the next generation that haven't
# been analyzed yet.
function maybe_import() {
Expand Down Expand Up @@ -130,6 +142,7 @@ while true; do
# Make the new test cases part of the next generation
add_to_next_generation $work_dir/symcc_out
maybe_export $work_dir/symcc_out
remove_analysed $work_dir/next
echo $(basename $f) >> $work_dir/analyzed_inputs
rm -f $f
done
Expand Down

0 comments on commit c3730d8

Please sign in to comment.