#!/bin/tcsh

source /cad/xilinx-1.5/setup

cd /fpga8/users/bellowsp/jhdl/new/byucc/jhdl/Xilinx/XC4000/techmap/test/ports/m1

# The success of the test will be communicated by the existence 
# of this file.  Remove the file before we run the ngdbuild, and 
# recreate it after the run.  The remote Java client will test for
# the file, and report success if the file exists.
rm -rf .danglewrapper_ngdbuild_test_passed

ngdbuild -p xc4036exhq240-3 danglewrapper1 >& .danglewrapper_ngdbuild_test_log

if ( $status != 0 ) then
  echo Failed on danglewrapper1!
  exit 1
endif

ngdbuild -p xc4036exhq240-3 danglewrapper2 >>& .danglewrapper_ngdbuild_test_log

if ( $status != 0 ) then
  echo Failed on danglewrapper2!
  exit 1
endif

ngdbuild -p xc4036exhq240-3 danglewrapper3 >>& .danglewrapper_ngdbuild_test_log

if ( $status != 0 ) then
  echo Failed on danglewrapper3!
  exit 1
endif


echo All NGDBUILD tests passed!

echo juice newton > .danglewrapper_ngdbuild_test_passed

exit 0



