mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	tests: Run lint tests with detected bash
When we invoke a shell script directly, the system selects a bash binary
that might be different from the one detected by find_program('bash').
Explicitly use the one detected by Meson, matching the behavior of our
other test() invocations on shell scripts.
Fixes test failure on Windows in GitHub Actions CI:
    stdout: 1: UNKNOWN: Windows Subsystem for Linux has no installed distributions.
    stdout: 2: UNKNOWN: Distributions can be installed by visiting the Microsoft Store:
    stdout: 3: UNKNOWN: https://aka.ms/wslstore
Found-by: Benoit Pierre <benoit.pierre@gmail.com>
Fixes: d7601f7eed ("Incorporate some lint checks into `meson test`")
			
			
This commit is contained in:
		
				
					committed by
					
						
						Philip Withnall
					
				
			
			
				
	
			
			
			
						parent
						
							8200545ece
						
					
				
				
					commit
					8ed025769e
				
			@@ -15,7 +15,9 @@ lint_scripts = [
 | 
				
			|||||||
if have_bash
 | 
					if have_bash
 | 
				
			||||||
  foreach test_name : lint_scripts
 | 
					  foreach test_name : lint_scripts
 | 
				
			||||||
    test(
 | 
					    test(
 | 
				
			||||||
      test_name, files(test_name),
 | 
					      test_name,
 | 
				
			||||||
 | 
					      bash,
 | 
				
			||||||
 | 
					      args : [files(test_name)],
 | 
				
			||||||
      env : test_env,
 | 
					      env : test_env,
 | 
				
			||||||
      suite : ['lint', 'no-valgrind'],
 | 
					      suite : ['lint', 'no-valgrind'],
 | 
				
			||||||
      protocol : 'tap',
 | 
					      protocol : 'tap',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user