Megatest

Check-in [8574e9978e]
Login
Overview
Comment:Simplified testpatt vs. runtests
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.54 | v1.5421
Files: files | file ages | folders
SHA1: 8574e9978eb8f4422e293db7426b25b9e85068d2
User & Date: matt on 2013-05-04 23:56:08
Other Links: branch diff | manifest | tags
Context
2013-05-05
00:35
Minor optimization. Enabled key env vars in using -show-runconfig check-in: 12652f0dbd user: matt tags: v1.54
2013-05-04
23:56
Simplified testpatt vs. runtests check-in: 8574e9978e user: matt tags: v1.54, v1.5421
10:54
Merged fork check-in: 7fd83b4cb2 user: matt tags: v1.54
Changes

Modified http-transport.scm from [b400e69336] to [fe6673ff15].

11
12
13
14
15
16
17

18

19
20
21
22
23
24
25
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27







+

+







(require-extension (srfi 18) extras tcp s11n)

(use sqlite3 srfi-1 posix regex regex-case srfi-69 hostinfo md5 message-digest)
(import (prefix sqlite3 sqlite3:))

(use spiffy uri-common intarweb http-client spiffy-request-vars)

;; Configurations for server
(tcp-buffer-size 2048)
(max-connections 2048) 

(declare (unit http-transport))

(declare (uses common))
(declare (uses db))
(declare (uses tests))
(declare (uses tasks)) ;; tasks are where stuff is maintained about what is running.

Modified megatest.scm from [e9c318c2e7] to [a6c4f0612e].

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20












-
+







;; Copyright 2006-2012, Matthew Welland.
;; 
;;  This program is made available under the GNU GPL version 2.0 or
;;  greater. See the accompanying file COPYING for details.
;; 
;;  This program is distributed WITHOUT ANY WARRANTY; without even the
;;  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;;  PURPOSE.

;; (include "common.scm")
;; (include "megatest-version.scm")

(use sqlite3 srfi-1 posix regex regex-case srfi-69 base64 format readline apropos json) ;; (srfi 18) extras)
(use sqlite3 srfi-1 posix regex regex-case srfi-69 base64 format readline apropos json http-client) ;; (srfi 18) extras)
(import (prefix sqlite3 sqlite3:))
(import (prefix base64 base64:))

;; (use zmq)

(declare (uses common))
(declare (uses megatest-version))
31
32
33
34
35
36
37
38
39



40
41
42
43
44
45
46
31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46
47







-
-
+
+
+








(include "common_records.scm")
(include "key_records.scm")
(include "db_records.scm")
(include "megatest-fossil-hash.scm")

;; (use trace dot-locking)
;; (trace
;;  tests:match)
;;  (trace
;;   tests:match
;;   runs:run-tests)
;;  db:teststep-set-status!
;;  db:open-test-db-by-test-id
;;  db:test-get-rundir-from-test-id
;;  cdb:tests-register-test
;;  cdb:tests-update-uname-host
;;  cdb:tests-update-run-duration
;;  ;;  cdb:client-call
620
621
622
623
624
625
626
627
628

629
630
631
632
633
634
635
621
622
623
624
625
626
627


628
629
630
631
632
633
634
635







-
-
+







  (general-run-call 
   "-runtests" 
   "run a test" 
   (lambda (target runname keys keynames keyvallst)
     (runs:run-tests target
		     runname
		     (args:get-arg "-runtests")
		     (or (args:get-arg "-testpatt")
			 (args:get-arg "-runtests"))
		     (args:get-arg "-runtests")
		     user
		     args:arg-hash))))

;;======================================================================
;; Rollup into a run
;;======================================================================

1054
1055
1056
1057
1058
1059
1060


1061
1062
1063
1064
1065
1066
1067
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069







+
+







		(load (args:get-arg "-load"))))
	  (exit))
      (set! *didsomething* #t)))

;;======================================================================
;; Exit and clean up
;;======================================================================

(if *runremote* (close-all-connections!))

;; this is the socket if we are a client
;; (if (and *runremote*
;; 	 (socket? *runremote*))
;;     (close-socket *runremote*))

(if (not *didsomething*)

Modified tests/fdktestqa/testqa/Makefile from [c0a9a7e634] to [1da3e6f8f7].

1



2
3






















1
2
3
4

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-
+
+
+

-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

BINDIR=$(PWD)/../../../bin
MEGATEST=$(BINDIR)/megatest
DASHBOARD=$(BINDIR)/dashboard
all :
	megatest -runtests % -target a/b :runname c
	$(MEGATEST) -runtests % -target a/b :runname c

bigbig :
	for tn in a b c d;do \
	   ($(MEGATEST) -runtests % -target a/b :runname $tn & ) ; \
	done

bigrun :
	$(MEGATEST) -runtests bigrun -target a/bigrun :runname a

bigrun2 :
	$(MEGATEST) -runtests bigrun2 -target a/bigrun2 :runname a

dashboard : 
	$(DASHBOARD) -rows 20 &

compile :
	(cd ../../..;make && make install)

clean :
	rm -rf ../simple*/*/* megatest.db

Modified tests/fdktestqa/testqa/tests/bigrun2/step1.sh from [ce1bf17341] to [f90152c7af].

1
2
3
4
5
6
7








1






2
3
4
5
6
7
8
9

-
-
-
-
-
-
+
+
+
+
+
+
+
+
#!/bin/sh
prev_test=`$MT_MEGATEST -test-paths -target $MT_TARGET :runname $MT_RUNNAME -testpatt bigrun/$NUMBER`
if [ -e $prev_test/testconfig ]; then
  exit 0
else
  exit 1
fi
# prev_test=`$MT_MEGATEST -test-paths -target $MT_TARGET :runname $MT_RUNNAME -testpatt bigrun/$NUMBER`
# if [ -e $prev_test/testconfig ]; then
#   exit 0
# else
#   exit 1
# fi

exit 0

Modified tests/fdktestqa/testqa/tests/bigrun2/testconfig from [4f3289f0a3] to [5d695076f7].

1
2
3
4
5
6
7

8
9
10
11
12
13
14

15
16
17
18
19
20
21
1
2
3
4
5
6

7
8
9
10
11
12
13

14
15
16
17
18
19
20
21






-
+






-
+







# Add additional steps here. Format is "stepname script"
[ezsteps]
step1 step1.sh

# Test requirements are specified here
[requirements]
waiton bigrun
# waiton bigrun
priority 0
mode itemmatch


# Iteration for your tests are controlled by the items section
[items]
NUMBER #{scheme (string-intersperse (map number->string (sort (let loop ((a 0)(res '()))(if (< a 150)(loop (+ a 1)(cons a res)) res)) >)) " ")}
NUMBER #{scheme (string-intersperse (map number->string (sort (let loop ((a 0)(res '()))(if (< a 1500)(loop (+ a 1)(cons a res)) res)) >)) " ")}

# test_meta is a section for storing additional data on your test
[test_meta]
author matt
owner  matt
description An example test
tags tagone,tagtwo