Files
mercury/tests/analysis_table/table_runtest.sh
Zoltan Somogyi de2f7b2a0c Flatten the test directories, step 2.
Specifically, rename the following subdirectories of the test directory:

    old dir name                new dir name

    analysis/ext                analysis_external
    analysis/ctgc               analysis_ctgc
    analysis/excp               analysis_excp
    analysis/table              analysis_table
    analysis/trail              analysis_trail
    invalid/purity              invalid_purity
    analysis/sharing            analysis_sharing
    hard_coded/purity           purity
    general/accumulator         accumulator
    analysis/unused_args        analysis_unused_args
    debugger/declarative        declarative_debugger
    hard_coded/exceptions       exceptions
    general/string_format       string_format
    hard_coded/sub-modules      submodules
    hard_coded/typeclasses      typeclasses
    general/structure_reuse     structure_reuse

Some subdirectories are still there, to wit, the subdirs of the inactive
test directory stm, each of which (if I remember correctly) holds only one
test case.

The general/structure_reuse directory previously wasn't enabled; I think
this was a bug.

tests/Mmakefile:
tools/bootcheck:
    List the new test directories.

tests/Mmake.common:
    The analysis_* directories each need to know whether the workspace
    uses subdirs. This used to be controlled from one place,
    analysis/Mmakefile, but since analysis_* are not subdirs of analysis,
    we need a new central place to find this out.

tests/analysis/common.sh:
    Update documentation for the move.

tests/OLDDIRS/Mmakefile:
    Set the subdir list to empty.

tests/NEWDIRS/Mmakefile:
    Update the "this" directory's name, as well as TESTS_DIR.

    In analysis_*/Mmakefile, use the new mechanism for detecting the presence
    of subdirs.
2015-02-10 00:44:14 +11:00

70 lines
2.0 KiB
Bash
Executable File

#!/bin/sh
# vim: ft=sh ts=8 sts=4 sw=4 et
#-----------------------------------------------------------------------------#
# Test --analyse-mm-tabling with the intermodule analysis framework.
. ../analysis/common.sh
set -e
set -x
rm -rf Mercury
: Step 1
cat table_m1.m.no_tabling > table_m1.m
$MMCMAKE table_m1.analyse --analysis-repeat 0 || failed
check_result table_m1 'tabling.*aaa.*mm_tabled_may_call'
check_result table_m1 'tabling.*aaa2.*mm_tabled_will_not_call'
check_result table_m2 'tabling.*bbb.*mm_tabled_may_call'
check_result table_m3 'tabling.*ccc.*mm_tabled_will_not_call'
check_statuses 'suboptimal.suboptimal.optimal.'
check_no_requests
: Step 2
$MMCMAKE table_m1.analyse --analysis-repeat 2 || failed
check_result table_m1 'tabling.*aaa.*mm_tabled_will_not_call'
check_result table_m1 'tabling.*aaa2.*mm_tabled_will_not_call'
check_result table_m2 'tabling.*bbb.*mm_tabled_will_not_call'
check_result table_m3 'tabling.*ccc.*mm_tabled_will_not_call'
check_statuses 'optimal.optimal.optimal.'
check_no_requests
check_imdg table_m2 'table_m1.*tabling.*bbb'
check_imdg table_m3 'table_m2.*tabling.*ccc'
check_imdg table_m1 'table_m3.*tabling.*aaa'
: Step 3
sleep 1
cat table_m1.m.tabling > table_m1.m
$MMCMAKE table_m1.analyse --analysis-repeat 0 || failed
check_result table_m1 'tabling.*aaa.*mm_tabled_may_call'
check_result table_m1 'tabling.*aaa2.*mm_tabled_may_call'
check_result table_m2 'tabling.*bbb.*mm_tabled_may_call'
check_result table_m3 'tabling.*ccc.*mm_tabled_may_call'
check_statuses 'optimal.optimal.optimal.'
check_no_requests
: Step 4
sleep 1
cat table_m1.m.no_tabling > table_m1.m
$MMCMAKE table_m1.analyse --analysis-repeat 3 || failed
check_result table_m1 'tabling.*aaa.*mm_tabled_will_not_call'
check_result table_m1 'tabling.*aaa2.*mm_tabled_will_not_call'
check_result table_m2 'tabling.*bbb.*mm_tabled_will_not_call'
check_result table_m3 'tabling.*ccc.*mm_tabled_will_not_call'
check_statuses 'optimal.optimal.optimal.'
check_no_requests
: Succeeded
exit 0
#-----------------------------------------------------------------------------#