home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 33.ddi / install / forms3.verify < prev    next >
Encoding:
Text File  |  1991-03-04  |  9.4 KB  |  352 lines

  1. :
  2. # $Header: forms30.ver.pp,v 6.16 90/03/01 15:39:33 eho Exp $ forms.ver.pp 
  3. #
  4. # forms30.verify
  5. #
  6. # This script does the following to verify that the SQL*Forms product has been
  7. # installed successfully:
  8. #
  9. #    - checks for the presence of all files in the FORMS30.DIST list.
  10. #    - checks that 7 SQL*Forms executables are linked together.
  11. #    - checks that 2 runform executables are linked together.
  12. #    - checks banner of the SQL*Forms executable invoked as convert, generate,
  13. #      and runform
  14. #    - checks for existence of .msb files.
  15. #    - checks for successful installation of tables, synonyms, and views.
  16. #    - checks for existence of genxtb table for scott/tiger.
  17. #    - makes sure that user exits link.
  18. #    - checks basic execution of SQL*Forms Convert on forms30/demo/order.inp.
  19. #    - checks basic execution of SQL*Forms Generate on forms30/demo/order.inp.
  20. #    - runs fdemobld for scott/tiger to check sample table build.
  21. #    - runs fdemodrop for scott/tiger to check sample table drop.  
  22.  
  23. #   (This is just a short test to verify that SQL*Forms has been properly
  24. #    installed by the install process.  It is not for product demonstration
  25. #    or QA.)
  26. # The script is assumed itself to be in ?/forms30/install
  27. # All output of this automated process will be recorded in 
  28. # ?/forms30/install/forms30_ver.out
  29.  
  30. NETLIBNAME="nsl_s"
  31. PHYS_BLK_SIZE=2048  
  32. VNDR_NETLIBS="-lnsl_s "
  33. CHOWN=/bin/chown
  34. MAKE=make        
  35. ORACLE_LPPROG="/usr/bin/lp"
  36. ORACLE_PAGER="/usr/bin/more"
  37. ORACLE_LPSTAT="/usr/bin/lpstat"
  38.  
  39. #
  40. #  Initialize variables used in installation script.
  41. #
  42. PRODUCT=FORMS30
  43. product=forms30
  44. MKTG_NAME=SQL*Forms30
  45.  
  46. #
  47. #  Setup  the environment variables for the verification script.
  48. #
  49. . $ORACLE_HOME/install/setup.ver
  50.  
  51. #
  52. ## 1. Check for presence of all files in DIST list.
  53. #
  54. echo $N ".$C"           #Wait message
  55. echo "  Checking for the presence of all files in DIST list  (silent if all
  56.   present) ...
  57.  
  58. " >> $OUTPUT
  59.  
  60. cd $ORACLE_HOME
  61. if [ ! -r forms30/install/FORMS30.DIST ]; then
  62.     echo "  forms30/install/FORMS30.DIST not found"  >> $OUTPUT
  63. else
  64.     for FILE in `cat $ORACLE_HOME/forms30/install/FORMS30.DIST`
  65.     do 
  66.     ls $FILE 2>&1 | grep "not found" >> $OUTPUT
  67.     done
  68. fi
  69.  
  70. echo "
  71.        ###################################################################
  72. " >> $OUTPUT
  73.  
  74. #
  75. ## 2. Check to see that the SQL*Forms executable is properly linked to all 
  76. ##    of its identities in $ORACLE_HOME/bin.
  77. echo $N ".$C"           #Wait message
  78. echo "  Checking to see if SQL*Forms executable is properly linked to its
  79.   other identities (silent if links are all in place)...
  80.  
  81. " >> $OUTPUT
  82.  
  83. STD_INODE=`ls -li $ORACLE_HOME/bin/sqlforms30 | awk '{print $1}'`
  84. for OTHERNAME in iac30 iad30 iag30 design30 convert30 generate30
  85. do
  86.     INODE=`ls -li $ORACLE_HOME/bin/$OTHERNAME | awk '{print $1}'`
  87.     if [ "$INODE" != "$STD_INODE" ]; then
  88.     echo "  sqlforms30 is not linked to $OTHERNAME" >> $OUTPUT
  89.     fi
  90. done
  91. STD_INODE=`ls -li $ORACLE_HOME/bin/runform30 | awk '{print $1}'`
  92. INODE=`ls -li $ORACLE_HOME/bin/iap30 | awk '{print $1}'`
  93. if [ "$INODE" != "$STD_INODE" ]; then
  94.     echo "  runform30 is not linked to iap30" >> $OUTPUT
  95. fi
  96.  
  97. echo "
  98.        ###################################################################
  99. " >> $OUTPUT
  100.  
  101. #
  102. ## 3. Check banners of Convert, Generate, and Runform.
  103. #
  104. echo $N ".$C"           #Wait message
  105. echo "  Checking banners of Convert, Generate, and Runform...
  106.  
  107. " >> $OUTPUT
  108. convert30 | grep Version >> $OUTPUT
  109. generate30 | grep Version >> $OUTPUT
  110. runform30 | grep Version >> $OUTPUT
  111.  
  112. echo "
  113.        ###################################################################
  114. " >> $OUTPUT
  115.  
  116. #
  117. ## 4. Check for creation of National Language Support files (sqlforms*.msb)
  118. ##    in dbs directory.
  119. #     Not necessary any more.
  120.  
  121. #
  122. ## 5. Check for creation of all tables, synonyms, and indexes created by
  123. ##    iadtables.sql, iadindexes.sql, iadviews.sql, iadgrants.sql.
  124. #
  125. echo $N ".$C"           #Wait message
  126. echo "  Checking for creation of tables, synonyms, and indexes:
  127.  
  128.     Tables - form_app, form_blk, form_fld, form_trigger, form_trg, form_sqltxt,
  129.           form_page, form_map, form_comment, form_reference, form_procedurej
  130.     Synonyms - form_app, form_blk, form_fld, forms_page, form_map, form_sqltxt,
  131.            form_trg, form_trigger, form_comment, form_reference, 
  132.            form_procedure
  133.     Indexes - iform_app, iform_appnam, iform_blk, iform_fld, iform_trg, 
  134.           iform_trigger, iform_sqltxt, iform_page, iform_map, iform_comment,
  135.           iform_reference, iform_procedure
  136.  
  137.             (all should be found)...
  138.  
  139. " >> $OUTPUT
  140.  
  141. sqlplus $SYSTEM_PASS <<!   >/dev/null
  142. set pagesize 60
  143. column table_name format a15
  144. column synonym_name format a15
  145. column index_name format a15
  146. column column_name format a15
  147. spool verify
  148. select table_name from all_tables 
  149. where table_name like 'FORM_%';
  150. select synonym_name, table_name from all_synonyms 
  151. where synonym_name like 'FORM_%';
  152. select index_name, table_name from all_indexes
  153. where index_name like 'IFORM_%';
  154. select index_name, table_name, column_name from all_ind_columns
  155. where index_name like 'IFORM_%';
  156. exit;
  157. !
  158. cat verify.lst >> $OUTPUT
  159. rm -f verify.lst
  160.  
  161. echo "
  162.        ###################################################################
  163. " >> $OUTPUT
  164.  
  165. #
  166. ## 6. Check the existence of the IAPXTB table for scott/tiger.
  167. #
  168. echo $N ".$C"           #Wait message
  169. echo "  Checking existence of IAPXTB table for scott/tiger...
  170.  
  171. " >> $OUTPUT
  172.  
  173. sqlplus scott/tiger <<!  >/dev/null
  174. spool iapxtb_chk
  175. describe iapxtb;
  176. exit;
  177. !
  178. cat iapxtb_chk.lst >> $OUTPUT
  179. rm -f iapxtb_chk.lst
  180.  
  181. echo "
  182.        ###################################################################
  183. " >> $OUTPUT
  184.  
  185. #
  186. ## 7. Make sure that the user exits link.
  187. #
  188. echo $N ".$C"           #Wait message
  189. echo "  Making sure that user exits link...
  190.  
  191. " >> $OUTPUT
  192.  
  193. cd $ORACLE_HOME/forms30/lib
  194. if $MAKE -f sqlforms30.mk sqlforms30x >> $OUTPUT 2>&1 
  195. then
  196.     echo "      User exits linked successfully!!"  >> $OUTPUT
  197. else
  198.     echo "      User exit link test FAILED."  >> $OUTPUT
  199. fi
  200.  
  201. # Some machines leave the partially linked object around even if make failed.
  202. rm -f sqlforms30x >/dev/null
  203.  
  204. echo "
  205.        ###################################################################
  206. " >> $OUTPUT
  207.  
  208. #
  209. ## 8. Check basic execution of SQL*Forms Convert.
  210. #
  211. echo $N ".$C"           #Wait message
  212. echo "  Testing Insert Option of SQL*Forms Convert  (silent if passed)...
  213.  
  214. " >> $OUTPUT
  215.  
  216. cd $ORACLE_HOME/forms30/demo
  217. if convert30 -i order order scott/tiger  >/dev/null
  218. then
  219. # Make sure SQL*Forms Convert actually inserted the application.
  220.     echo "  Verifying presence of application in database
  221.   (this query should return an application named demo owned by SCOTT) ...
  222.  
  223. " >> $OUTPUT
  224.  
  225.     sqlplus scott/tiger <<!  >/dev/null
  226.        spool convert30
  227.        select appowner, appname from form_app
  228.        where appowner = 'SCOTT' and appname = 'order';
  229.        exit;
  230. !
  231.     cat convert30.lst  >> $OUTPUT
  232.     rm -f convert30.lst
  233. else
  234.     echo  "SQL*Forms Convert - Application Insertion Verification Failed" >> $OUTPUT
  235. fi
  236.  
  237. echo "
  238.   Testing Delete Option of SQL*Forms Convert  (silent if passed)...
  239.  
  240. " >> $OUTPUT
  241.  
  242. if convert30 -d order order scott/tiger  >/dev/null
  243. then
  244. # Make sure SQL*Forms Convert actually deleted the application.
  245.     echo "  Verifying presence of application in database
  246.       (this query should return no records) ...
  247.  
  248. " >> $OUTPUT
  249.  
  250.     sqlplus scott/tiger <<!  >/dev/null
  251.        spool convert30
  252.        select appowner, appname from form_app
  253.        where appowner = 'SCOTT' and appname = 'order';
  254.        exit;
  255. !
  256.     cat convert30.lst  >> $OUTPUT
  257.     rm -f convert30.lst
  258. else
  259.     echo  "SQL*Forms Convert - Application Deletion Verification Failed" >> $OUTPUT
  260. fi
  261.  
  262. echo "
  263.        ###################################################################
  264.  
  265. " >> $OUTPUT
  266.  
  267. #
  268. ## 9. Check basic execution of SQL*Forms Generate.
  269. #
  270. echo $N ".$C"           #Wait message
  271. echo "  Testing basic execution of SQL*Forms Generate (silent if passed)...
  272.  
  273. " >> $OUTPUT
  274.  
  275. cd $ORACLE_HOME/forms30/demo
  276. if generate30 -to order scott/tiger>/dev/null
  277. then
  278.     rm -f order.frm
  279. else
  280.     echo  "SQL*Forms Generate - Execution Verification Failed" >> $OUTPUT
  281. fi
  282.  
  283. echo "
  284.        ###################################################################
  285. " >> $OUTPUT
  286.  
  287. #
  288. ## 10. Check sample table build to be used with "SQL*Forms Designer's 
  289. ##     Tutorial"
  290. #
  291. echo $N ".$C"           #Wait message
  292. echo "  Checking f30demobld for scott/tiger (all tables should be found)...
  293.  
  294. " >> $OUTPUT
  295.  
  296. if f30demobld scott tiger >/dev/null
  297. then
  298.     sqlplus scott/tiger <<!  >/dev/null
  299.        spool f30demobld
  300.        describe scott.ord;
  301.        describe scott.item;
  302.        describe scott.price;
  303.        describe scott.product;
  304.        describe scott.customer;
  305.        exit;
  306. !
  307.     cat f30demobld.lst >> $OUTPUT
  308.     rm -f f30demobld.lst
  309. else
  310.     echo "    f30demobld failed!!"  >> $OUTPUT
  311. fi
  312.  
  313. echo "
  314.        ###################################################################
  315. " >> $OUTPUT
  316.  
  317. #
  318. ## 11. Check sample table drop to be used with "SQL*Forms Designer's 
  319. ##     Tutorial"
  320. #
  321. echo $N ".$C"           #Wait message
  322. echo "  Checking f30demodrop for scott/tiger (no tables should be found)...
  323.  
  324. " >> $OUTPUT
  325.  
  326. if f30demodrop scott tiger >/dev/null
  327. then
  328.     sqlplus scott/tiger <<!  >/dev/null
  329.     spool f3demodrop
  330.     select table_name from user_tables
  331.     where table_name = 'ORD'
  332.        or table_name = 'ITEM'
  333.        or table_name = 'PRICE'
  334.        or table_name = 'PRODUCT'
  335.        or table_name = 'SEQ';
  336.     exit;
  337. !
  338.     cat f3demodrop.lst >> $OUTPUT
  339.     rm -f f3demodrop.lst
  340. else
  341.     echo "    f30demodrop failed!!"  >> $OUTPUT
  342. fi
  343.  
  344. echo "
  345.                #######    Forms30.Verify Done    #######
  346. " | tee -a $OUTPUT
  347.