|
|
@ -4,255 +4,249 @@ leo() {
|
|
|
|
$LEO "$@"
|
|
|
|
$LEO "$@"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Build and run the auction Leo program.
|
|
|
|
## Build and run the auction Leo program.
|
|
|
|
echo "Building and running the \`auction\` program..."
|
|
|
|
#echo "Building and running the \`auction\` program..."
|
|
|
|
(
|
|
|
|
#(
|
|
|
|
cd $EXAMPLES/auction || exit
|
|
|
|
# cd $EXAMPLES/auction || exit
|
|
|
|
$LEO run place_bid || exit
|
|
|
|
#
|
|
|
|
$LEO run resolve || exit
|
|
|
|
# chmod +x $EXAMPLES/auction/run.sh || exit
|
|
|
|
$LEO run finish || exit
|
|
|
|
# export -f leo || exit
|
|
|
|
|
|
|
|
# $EXAMPLES/auction/run.sh || exit
|
|
|
|
chmod +x $EXAMPLES/auction/run.sh || exit
|
|
|
|
#)
|
|
|
|
export -f leo || exit
|
|
|
|
## Check that the auction program ran successfully.
|
|
|
|
$EXAMPLES/auction/run.sh || exit
|
|
|
|
#EXITCODE=$?
|
|
|
|
)
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
# Check that the auction program ran successfully.
|
|
|
|
# echo "The \`auction\` program failed to run successfully."
|
|
|
|
EXITCODE=$?
|
|
|
|
# exit $EXITCODE
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#fi
|
|
|
|
echo "The \`auction\` program failed to run successfully."
|
|
|
|
#
|
|
|
|
exit $EXITCODE
|
|
|
|
## Build and run the basic_bank Leo program.
|
|
|
|
fi
|
|
|
|
#echo "Building and running the \`basic_bank\` program..."
|
|
|
|
|
|
|
|
#(
|
|
|
|
# Build and run the basic_bank Leo program.
|
|
|
|
# cd $EXAMPLES/basic_bank || exit
|
|
|
|
echo "Building and running the \`basic_bank\` program..."
|
|
|
|
#
|
|
|
|
(
|
|
|
|
# chmod +x $EXAMPLES/basic_bank/run.sh || exit
|
|
|
|
cd $EXAMPLES/basic_bank || exit
|
|
|
|
# export -f leo || exit
|
|
|
|
$LEO run issue || exit
|
|
|
|
# $EXAMPLES/basic_bank/run.sh || exit
|
|
|
|
$LEO run deposit || exit
|
|
|
|
#)
|
|
|
|
$LEO run withdraw || exit
|
|
|
|
## Check that the basic_bank program ran successfully.
|
|
|
|
|
|
|
|
#EXITCODE=$?
|
|
|
|
chmod +x $EXAMPLES/basic_bank/run.sh || exit
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
export -f leo || exit
|
|
|
|
# echo "The \`basic_bank\` program failed to run successfully."
|
|
|
|
$EXAMPLES/basic_bank/run.sh || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the basic_bank program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the battleship Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`battleship\` program..."
|
|
|
|
echo "The \`basic_bank\` program failed to run successfully."
|
|
|
|
#which leo
|
|
|
|
exit $EXITCODE
|
|
|
|
#(
|
|
|
|
fi
|
|
|
|
# cd $EXAMPLES/battleship || exit
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build and run the battleship Leo program.
|
|
|
|
# chmod +x $EXAMPLES/battleship/run.sh || exit
|
|
|
|
echo "Building and running the \`battleship\` program..."
|
|
|
|
# export -f leo || exit
|
|
|
|
which leo
|
|
|
|
# $EXAMPLES/battleship/run.sh || exit
|
|
|
|
(
|
|
|
|
#)
|
|
|
|
cd $EXAMPLES/battleship || exit
|
|
|
|
## Check that the battleship program ran successfully.
|
|
|
|
|
|
|
|
#EXITCODE=$?
|
|
|
|
chmod +x $EXAMPLES/battleship/run.sh || exit
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
export -f leo || exit
|
|
|
|
# echo "The \`battleship\` program failed to run successfully."
|
|
|
|
$EXAMPLES/battleship/run.sh || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the battleship program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the bubblesort Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`bubblesort\` program..."
|
|
|
|
echo "The \`battleship\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/bubblesort || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/bubblesort/inputs/bubblesort.in | xargs $LEO run bubble_sort || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the bubblesort Leo program.
|
|
|
|
## Check that the bubblesort program ran successfully.
|
|
|
|
echo "Building and running the \`bubblesort\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/bubblesort || exit
|
|
|
|
# echo "The \`bubblesort\` program failed to run successfully."
|
|
|
|
$LEO run bubble_sort || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the bubblesort program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the core example Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`core\` program..."
|
|
|
|
echo "The \`bubblesort\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/core || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/core/inputs/core.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the core example Leo program.
|
|
|
|
## Check that the core program ran successfully.
|
|
|
|
echo "Building and running the \`core\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/core || exit
|
|
|
|
# echo "The \`core\` program failed to run successfully."
|
|
|
|
$LEO run main || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the core program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the groups example Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`groups\` program..."
|
|
|
|
echo "The \`core\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/groups || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/groups/inputs/groups.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the groups example Leo program.
|
|
|
|
## Check that the groups program ran successfully.
|
|
|
|
echo "Building and running the \`groups\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/groups || exit
|
|
|
|
# echo "The \`groups\` program failed to run successfully."
|
|
|
|
$LEO run main || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the groups program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzdebruijn program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzdebruijn\` program..."
|
|
|
|
echo "The \`groups\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzdebruijn || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzdebruijn/inputs/ntzdebruijn.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzdebruijn program.
|
|
|
|
## Check that the hackers-delight/ntzdebruijn program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzdebruijn\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzdebruijn || exit
|
|
|
|
# echo "The \`hackers-delight/ntzdebruijn\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzdebruijn program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzgaudet program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzgaudet\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzdebruijn\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzgaudet || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzgaudet/inputs/ntzgaudet.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzgaudet program.
|
|
|
|
## Check that the hackers-delight/ntzgaudet program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzgaudet\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzgaudet || exit
|
|
|
|
# echo "The \`hackers-delight/ntzgaudet\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzgaudet program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzloops program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzloops\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzgaudet\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzloops || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzloops/inputs/ntzloops.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzloops program.
|
|
|
|
## Check that the hackers-delight/ntzloops program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzloops\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzloops || exit
|
|
|
|
# echo "The \`hackers-delight/ntzloops\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzloops program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzmasks program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzmasks\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzloops\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzmasks || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzmasks/inputs/ntzmasks.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzmasks program.
|
|
|
|
## Check that the hackers-delight/ntzmasks program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzmasks\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzmasks || exit
|
|
|
|
# echo "The \`hackers-delight/ntzmasks\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzmasks program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzreisers program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzreisers\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzmasks\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzreisers || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzreisers/inputs/ntzreisers.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzreisers program.
|
|
|
|
## Check that the hackers-delight/ntzreisers program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzreisers\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzreisers || exit
|
|
|
|
# echo "The \`hackers-delight/ntzreisers\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzreisers program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzseals program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzseals\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzreisers\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzseals || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzseals/inputs/ntzseals.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzseals program.
|
|
|
|
## Check that the hackers-delight/ntzseals program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzseals\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzseals || exit
|
|
|
|
# echo "The \`hackers-delight/ntzseals\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzseals program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzsearchtree program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzsearchtree\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzseals\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzsearchtree || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzsearchtree/inputs/ntzsearchtree.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzsearchtree program.
|
|
|
|
## Check that the hackers-delight/ntzsearchtree program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzsearchtree\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzsearchtree || exit
|
|
|
|
# echo "The \`hackers-delight/ntzsearchtree\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzsearchtree program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the hackers-delight/ntzsmallvals program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`hackers-delight/ntzsmallvals\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzsearchtree\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/hackers-delight/ntzsmallvals || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/hackers-delight/ntzsmallvals/inputs/ntzsmallvals.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the hackers-delight/ntzsmallvals program.
|
|
|
|
## Check that the hackers-delight/ntzsmallvals program ran successfully.
|
|
|
|
echo "Building and running the \`hackers-delight/ntzsmallvals\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/hackers-delight/ntzsmallvals || exit
|
|
|
|
# echo "The \`hackers-delight/ntzsmallvals\` program failed to run successfully."
|
|
|
|
$LEO run || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the hackers-delight/ntzsmallvals program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the helloworld Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`helloworld\` program..."
|
|
|
|
echo "The \`hackers-delight/ntzsmallvals\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/helloworld || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/helloworld/inputs/helloworld.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the helloworld Leo program.
|
|
|
|
## Check that the helloworld program ran successfully.
|
|
|
|
echo "Building and running the \`helloworld\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/helloworld || exit
|
|
|
|
# echo "The \`helloworld\` program failed to run successfully."
|
|
|
|
$LEO run main || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the helloworld program ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
#
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
## Build and run the interest example Leo programs.
|
|
|
|
echo "The \`helloworld\` program failed to run successfully."
|
|
|
|
#echo "Building and running the \`interest\` programs..."
|
|
|
|
exit $EXITCODE
|
|
|
|
#(
|
|
|
|
fi
|
|
|
|
# cd $EXAMPLES/interest || exit
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# # Run the fixed period interest program.
|
|
|
|
# Build and run the interest example Leo programs.
|
|
|
|
# cat $EXAMPLES/interest/inputs/fixed.in | xargs $LEO run fixed_iteration_interest || exit
|
|
|
|
echo "Building and running the \`interest\` programs..."
|
|
|
|
#
|
|
|
|
(
|
|
|
|
# # Run the bounded period interest program.
|
|
|
|
cd $EXAMPLES/interest || exit
|
|
|
|
# cat $EXAMPLES/interest/inputs/bounded.in | xargs $LEO run bounded_iteration_interest || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Run the fixed period interest program.
|
|
|
|
## Check that the interest programs ran successfully.
|
|
|
|
$LEO run fixed_iteration_interest || exit
|
|
|
|
#EXITCODE=$?
|
|
|
|
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
# Run the bounded period interest program.
|
|
|
|
# echo "The \`interest\` program failed to run successfully."
|
|
|
|
$LEO run bounded_iteration_interest || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the interest programs ran successfully.
|
|
|
|
#
|
|
|
|
EXITCODE=$?
|
|
|
|
## Build and run the message example Leo program.
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
#echo "Building and running the \`message\` program..."
|
|
|
|
echo "The \`interest\` program failed to run successfully."
|
|
|
|
#(
|
|
|
|
exit $EXITCODE
|
|
|
|
# cd $EXAMPLES/message || exit
|
|
|
|
fi
|
|
|
|
# cat $EXAMPLES/message/inputs/message.in | xargs $LEO run main || exit
|
|
|
|
|
|
|
|
#)
|
|
|
|
# Build and run the message example Leo program.
|
|
|
|
## Check that the message program ran successfully.
|
|
|
|
echo "Building and running the \`message\` program..."
|
|
|
|
#EXITCODE=$?
|
|
|
|
(
|
|
|
|
#if [ $EXITCODE -ne 0 ]; then
|
|
|
|
cd $EXAMPLES/message || exit
|
|
|
|
# echo "The \`message\` program failed to run successfully."
|
|
|
|
$LEO run main || exit
|
|
|
|
# exit $EXITCODE
|
|
|
|
)
|
|
|
|
#fi
|
|
|
|
# Check that the message program ran successfully.
|
|
|
|
|
|
|
|
EXITCODE=$?
|
|
|
|
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
|
|
|
|
echo "The \`message\` program failed to run successfully."
|
|
|
|
|
|
|
|
exit $EXITCODE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Build and run the tic tac toe example Leo program.
|
|
|
|
# Build and run the tic tac toe example Leo program.
|
|
|
|
echo "Building and running the \`tictactoe\` program..."
|
|
|
|
echo "Building and running the \`tictactoe\` program..."
|
|
|
|
(
|
|
|
|
(
|
|
|
|
cd $EXAMPLES/tictactoe || exit
|
|
|
|
cd $EXAMPLES/tictactoe || exit
|
|
|
|
$LEO run new || exit
|
|
|
|
$LEO run new || exit
|
|
|
|
$LEO run make_move || exit
|
|
|
|
cat $EXAMPLES/tictactoe/inputs/tictactoe.in | xargs $LEO run make_move || exit
|
|
|
|
|
|
|
|
|
|
|
|
chmod +x $EXAMPLES/tictactoe/run.sh || exit
|
|
|
|
chmod +x $EXAMPLES/tictactoe/run.sh || exit
|
|
|
|
export -f leo
|
|
|
|
export -f leo
|
|
|
@ -271,10 +265,10 @@ echo "Building and running the \`simple_token\` programs..."
|
|
|
|
cd $EXAMPLES/simple_token || exit
|
|
|
|
cd $EXAMPLES/simple_token || exit
|
|
|
|
|
|
|
|
|
|
|
|
# Run the mint program.
|
|
|
|
# Run the mint program.
|
|
|
|
$LEO run mint
|
|
|
|
cat $EXAMPLES/simple_token/inputs/mint.in | xargs $LEO run mint || exit
|
|
|
|
|
|
|
|
|
|
|
|
# Run the transfer program.
|
|
|
|
# Run the transfer program.
|
|
|
|
$LEO run transfer
|
|
|
|
cat $EXAMPLES/simple_token/inputs/transfer.in | xargs $LEO run transfer || exit
|
|
|
|
)
|
|
|
|
)
|
|
|
|
# Check that the simple token programs ran successfully.
|
|
|
|
# Check that the simple token programs ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
EXITCODE=$?
|
|
|
@ -288,23 +282,9 @@ echo "Building and running the \`token\` program..."
|
|
|
|
(
|
|
|
|
(
|
|
|
|
cd $EXAMPLES/token || exit
|
|
|
|
cd $EXAMPLES/token || exit
|
|
|
|
|
|
|
|
|
|
|
|
# Run the mint_public function.
|
|
|
|
chmod +x $EXAMPLES/token/run.sh || exit
|
|
|
|
$LEO run mint_public || exit
|
|
|
|
export -f leo
|
|
|
|
|
|
|
|
$EXAMPLES/token/run.sh || exit
|
|
|
|
# Run the mint_private function.
|
|
|
|
|
|
|
|
$LEO run mint_private || exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the transfer_public function.
|
|
|
|
|
|
|
|
$LEO run transfer_public || exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the transfer_private function.
|
|
|
|
|
|
|
|
$LEO run transfer_private || exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the transfer_private_to_public function.
|
|
|
|
|
|
|
|
$LEO run transfer_private_to_public || exit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Run the transfer_public_to_private function.
|
|
|
|
|
|
|
|
$LEO run transfer_public_to_private || exit
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
# Check that the token program ran successfully.
|
|
|
|
# Check that the token program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
EXITCODE=$?
|
|
|
@ -317,7 +297,7 @@ fi
|
|
|
|
echo "Building and running the \`twoadicity\` program..."
|
|
|
|
echo "Building and running the \`twoadicity\` program..."
|
|
|
|
(
|
|
|
|
(
|
|
|
|
cd $EXAMPLES/twoadicity || exit
|
|
|
|
cd $EXAMPLES/twoadicity || exit
|
|
|
|
$LEO run main || exit
|
|
|
|
cat $EXAMPLES/twoadicity/inputs/twoadicity.in | xargs $LEO run main || exit
|
|
|
|
)
|
|
|
|
)
|
|
|
|
# Check that the two-adicity program ran successfully.
|
|
|
|
# Check that the two-adicity program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
EXITCODE=$?
|
|
|
@ -356,4 +336,4 @@ EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`lottery\` program failed to run successfully."
|
|
|
|
echo "The \`lottery\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|