Changeset 34 for trunk/src/tester.erl
- Timestamp:
- 08/22/08 18:46:07 (4 years ago)
- File:
-
- 1 edited
-
trunk/src/tester.erl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tester.erl
r30 r34 22 22 23 23 load ({File_name, Binary}, State) -> 24 {Module, Functions} = tests: filter_by_attribute (Binary),24 {Module, Tests} = tests: filter_by_attribute (Binary), 25 25 Node = dict: fetch (node, State), 26 26 Load_args = [Module, File_name, Binary], 27 27 {module, Module} = rpc: call (Node, code, load_binary, Load_args), 28 New_tests = dict: store (Module, Functions, dict: fetch (tests, State)),28 New_tests = dict: store (Module, Tests, dict: fetch (tests, State)), 29 29 dict: store (tests, New_tests, State). 30 30 31 31 test (State) -> 32 {Total, Tests} = flatten (dict: fetch (tests, State)), 32 Test_dict = dict: fetch (tests, State), 33 {Total, Tests} = flatten (Test_dict), 33 34 Notify = dict: fetch (notify, State), 34 35 Notify ({Total, 0, 0}), … … 37 38 38 39 flatten (Tests) -> 39 F = fun ( _, Ts, {Count, List}) ->40 {Count + length (Ts), [ Ts| List]}40 F = fun (Module, Ts, {Count, List}) -> 41 {Count + length (Ts), [[{Module, T} || T <- Ts] | List]} 41 42 end, 42 43 {Total, All} = dict: fold (F, {0, []}, Tests), … … 46 47 Node = dict: fetch (node, State), 47 48 Notify = dict: fetch (notify, State), 48 fun ({M , F, A}, {Run, Passed}) ->49 Pid = spawn_link (Node, M , F, A),49 fun ({Module, Function}, {Run, Passed}) -> 50 Pid = spawn_link (Node, Module, Function, []), 50 51 New_passed = 51 52 receive
Note: See TracChangeset
for help on using the changeset viewer.
