_acs-bootstrap-installer__apm_source (private)
_acs-bootstrap-installer__apm_source
Defined in packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs.tcl
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set _aa_export {} set body_count 1 foreach testcase_body {{ aa_section "Source nonexistent" aa_silence_log_entries -severities error { aa_equals "Proc returns 0 on nonexistent files" [apm_source noexist] 0 } aa_section "Source file outside the root_dir" close [ad_opentmpfile tmpfile] aa_true "Proc throws an error on an existing file '$tmpfile' not belonging to '[acs_root_dir]'" [catch { apm_source $tmpfile }] set wfd [ad_opentmpfile tmpfile] puts $wfd {if \{ } close $wfd aa_section "Source broken script" set testscript [acs_root_dir]/packages/acs-bootstrap-installer/[file tail $tmpfile] file copy -- $tmpfile [file dirname $testscript] aa_silence_log_entries -severities error { apm_source $testscript errors } file delete -- $testscript aa_true "Loading a broken script returned errors in the errors var" [llength [array get errors]] aa_silence_log_entries -severities error { aa_equals "Proc returns 0 on broken scripts" [apm_source $testscript] 0 } unset errors aa_section "Source a good script" set testscript [acs_root_dir]/packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs.tcl set mtime [file mtime $testscript] set r_file [ad_make_relative_path $testscript] apm_source $testscript errors aa_false "Loading a good script returned no errors" [llength [array get errors]] aa_equals "Proc returns 1 on good scripts" [apm_source $testscript] 1 aa_equals "mtime was stored in the nsv" $mtime [nsv_get apm_library_mtime $r_file] }} { aa_log "Running testcase body $body_count" set ::__aa_test_indent [info level] set catch_val [catch $testcase_body msg] if {$catch_val != 0 && $catch_val != 2} { aa_log_result "fail" "apm_source (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo" } incr body_count }Generic XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs.xql
PostgreSQL XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs-postgresql.xql
Oracle XQL file: packages/acs-bootstrap-installer/tcl/test/30-apm-load-procs-oracle.xql