mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	provision.py: Create dir var/node-coverage for js test coverage.
test-js-with-node: Move istanbul test coverage to var/node-coverage. This commit moves js test coverage generated through istanbul to var/node-coverage.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							b36dfc0395
						
					
				
				
					commit
					4350b6e0fb
				
			@@ -33,6 +33,7 @@ UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'uploads')
 | 
				
			|||||||
TEST_UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'test_uploads')
 | 
					TEST_UPLOAD_DIR_PATH = os.path.join(VAR_DIR_PATH, 'test_uploads')
 | 
				
			||||||
COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage')
 | 
					COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'coverage')
 | 
				
			||||||
LINECOVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'linecoverage-report')
 | 
					LINECOVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'linecoverage-report')
 | 
				
			||||||
 | 
					NODE_TEST_COVERAGE_DIR_PATH = os.path.join(VAR_DIR_PATH, 'node-coverage')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if PY2:
 | 
					if PY2:
 | 
				
			||||||
    VENV_PATH = PY2_VENV_PATH
 | 
					    VENV_PATH = PY2_VENV_PATH
 | 
				
			||||||
@@ -206,6 +207,8 @@ def main():
 | 
				
			|||||||
    run(["mkdir", "-p", COVERAGE_DIR_PATH])
 | 
					    run(["mkdir", "-p", COVERAGE_DIR_PATH])
 | 
				
			||||||
    # create linecoverage directory`var/linecoverage-report`
 | 
					    # create linecoverage directory`var/linecoverage-report`
 | 
				
			||||||
    run(["mkdir", "-p", LINECOVERAGE_DIR_PATH])
 | 
					    run(["mkdir", "-p", LINECOVERAGE_DIR_PATH])
 | 
				
			||||||
 | 
					    # create linecoverage directory`var/node-coverage`
 | 
				
			||||||
 | 
					    run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if TRAVIS:
 | 
					    if TRAVIS:
 | 
				
			||||||
        run(["tools/setup/install-phantomjs", "--travis"])
 | 
					        run(["tools/setup/install-phantomjs", "--travis"])
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ ret=0
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if [ "$1" = "cover" ]; then
 | 
					if [ "$1" = "cover" ]; then
 | 
				
			||||||
  # Run a coverage test with Istanbul.
 | 
					  # Run a coverage test with Istanbul.
 | 
				
			||||||
  istanbul cover "$INDEX_JS" || ret=1;
 | 
					  istanbul cover "$INDEX_JS" --dir var/node-coverage || ret=1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
 | 
					elif [ "$1" = "-h" -o "$1" = "--help" ]; then
 | 
				
			||||||
  echo "Usage:
 | 
					  echo "Usage:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user