_acs-tcl__files__tcl_file_common_errors (private)

 _acs-tcl__files__tcl_file_common_errors

Defined in packages/acs-tcl/tcl/test/file-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) ad_file ad_file (public) ad_find_all_files ad_find_all_files (public) db_list db_list (public) _acs-tcl__files__tcl_file_common_errors _acs-tcl__files__tcl_file_common_errors _acs-tcl__files__tcl_file_common_errors->aa_log _acs-tcl__files__tcl_file_common_errors->aa_log_result _acs-tcl__files__tcl_file_common_errors->ad_file _acs-tcl__files__tcl_file_common_errors->ad_find_all_files _acs-tcl__files__tcl_file_common_errors->db_list

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    set installed_packages [db_list get_installed {
        select distinct package_key
        from apm_package_versions
        where installed_p = 't'
    }]

    # couple of local helper procs
    proc ::tcl_p {file} {
        return [expr {[string match {*.tcl} $file] || [ad_file isdirectory $file]}]
    }

    # if startdir is not $::acs::rootdir/packages, then somebody checked in the wrong thing by accident
    set startdir $::acs::rootdir/packages

    aa_log "Checks starting from $startdir"
    set count 0
    #inspect every Tcl file in the directory tree starting with $startdir
    foreach file [ad_find_all_files -check_file_func ::tcl_p $startdir] {
        if {![regexp ^.*/packages/([join $installed_packages |])/.*\$ $file]} {
            continue
        }
        if {[string match "*/acs-tcl/tcl/test/file-test-procs.tcl" $file]} {
            continue
        }

        incr count

        set fp [open $file "r"]
        set data [read $fp]
        close $fp

        if {[string first @returns $data] > -1} {
            aa_log_result fail "$file should not contain '@returns'.  @returns is probably a typo of @return"
        }
    }
    aa_log "Checked $count Tcl files"
}} {
          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" "files__tcl_file_common_errors (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: