OpenSource » Forked Projects » Kiln-Extensions
Clone URL:  
Pushed to one repository · View In Graph

4.3.1 This is the TortoiseHg 4.3.1 version

Changeset ac295e0f3e7f

Parent 8daab782def8

by Profile picture of Daniel PupekDaniel Pupek

Changes to 2 files · Browse files at ac295e0f3e7f Showing diff from parent 8daab782def8 Diff from another changeset...

Change 1 of 1 Show Entire File tests/​runner.py Stacked
 
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
26
27
28
29
30
31
32
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
34
 
@@ -1,34 +1,34 @@
-import os -import subprocess -import sys -import hgtest - -path = os.path.dirname(os.path.realpath(__file__)) - -args = vars(hgtest.parse_args()) -arglist = [] -for opt, val in args.iteritems(): - arglist.extend(['--' + opt, val]) - -files = os.listdir(path) -failures = 0 - -for file in files: - if file.startswith("test") and file.endswith(".py"): - try: - child = subprocess.Popen(["python", os.path.join(path, file)] + arglist, - stdout=sys.stdout, - stderr=sys.stderr, - stdin=sys.stdin, - universal_newlines=True) - - ret = child.wait() - if ret != 0: - failures += 1 - except: - if child.poll(): - child.kill() - raise - -if failures > 0: +import os +import subprocess +import sys +import hgtest + +path = os.path.dirname(os.path.realpath(__file__)) + +args = vars(hgtest.parse_args()) +arglist = [] +for opt, val in args.iteritems(): + arglist.extend(['--' + opt, val]) + +files = os.listdir(path) +failures = 0 + +for file in files: + if file.startswith("test") and file.endswith(".py"): + try: + child = subprocess.Popen(["python", os.path.join(path, file)] + arglist, + stdout=sys.stdout, + stderr=sys.stderr, + stdin=sys.stdin, + universal_newlines=True) + + ret = child.wait() + if ret != 0: + failures += 1 + except: + if child.poll(): + child.kill() + raise + +if failures > 0:   sys.exit("%i files failed" % failures) \ No newline at end of file
Change 1 of 1 Show Entire File tests/​test-kilnauth.py Stacked
 
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
26
27
28
29
30
31
32
33
34
35
36
37
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
34
35
36
37
38
@@ -1,38 +1,38 @@
-import hgtest -import os - -hgt = hgtest.Tester(auth=False) -hgt.announce('setup') -token = hgt.gettoken() -hgt.deletetest(token) -test = hgt.createtest(token) -hgt.hg(['clone', hgt.test_url(), 'repo1'], log=False, auth=True, - stdout='''no changes found -updating to branch default -0 files updated, 0 files merged, 0 files removed, 0 files unresolved -''') -os.chdir('repo1') - -hgt.hg(['logout']) - -hgt.hg(['pull'], stdin='\n\n', status=-1, - stderr='abort: http authorization required for %s' % hgt.test_url(), - stdout='''pulling from %s -''' % hgt.test_url()) - -hgt.hg(['pull'], auth=True, - stdout='''pulling from %s -no changes found -''' % hgt.test_url()) - -hgt.hg(['pull'], - stdout='''pulling from %s -no changes found -''' % hgt.test_url()) - -hgt.hg(['logout']) - -hgt.hg(['pull'], stdin='\n\n', status=-1, - stderr='abort: http authorization required for %s' % hgt.test_url(), - stdout='''pulling from %s -''' % hgt.test_url()) +import hgtest +import os + +hgt = hgtest.Tester(auth=False) +hgt.announce('setup') +token = hgt.gettoken() +hgt.deletetest(token) +test = hgt.createtest(token) +hgt.hg(['clone', hgt.test_url(), 'repo1'], log=False, auth=True, + stdout='''no changes found +updating to branch default +0 files updated, 0 files merged, 0 files removed, 0 files unresolved +''') +os.chdir('repo1') + +hgt.hg(['logout']) + +hgt.hg(['pull'], stdin='\n\n', status=-1, + stderr='abort: http authorization required for %s' % hgt.test_url(), + stdout='''pulling from %s +''' % hgt.test_url()) + +hgt.hg(['pull'], auth=True, + stdout='''pulling from %s +no changes found +''' % hgt.test_url()) + +hgt.hg(['pull'], + stdout='''pulling from %s +no changes found +''' % hgt.test_url()) + +hgt.hg(['logout']) + +hgt.hg(['pull'], stdin='\n\n', status=-1, + stderr='abort: http authorization required for %s' % hgt.test_url(), + stdout='''pulling from %s +''' % hgt.test_url())