Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

Run a program till its license is available

In many case you run a program and there is no license. In my case I tried to run specman and there was no license. It is a tedious task to keep trying, so I come up with this nice script:

Here is a very simple script that can help:

#!/bin/bash

i="0"
while [ $i -lt 400 ]
do
 #gmake -f ~/junk/Tmp/Makefile TEST=~/junk/Tmp/1txb_16qams_1flow.e GUI=no
  gmake -f ~/junk/Tmp/Makefile TEST=~/junk/Tmp/1txb_16qams_1flow.e
  echo "try number "$i
  sleep 4
  grep "Couldn.t acquire license" irun.log || exit
  i=$[$i+1]
done

Note: I used to find out that my test failed. Since I just wanted to quit the usage of: || exit is fine.
If I need to do more commands on fail, than I can check the exit status of grep command in the following way:

#check the exit status of a grep command
#checks if status is 0 (ended okay)
#
if [ $? -ne 0 ] ; then
  echo "not a local account" ;
  exit ;
fi


Home

scripts and utilities

Run a perl script from vim on a specified text block and convert verilog registers and wires to VHDL signals.






Search This Site


Feedback This Site




new pages on this site