File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- #  Run the Python script and capture the output and  error
3+ #  Run the Python script and capture the output or  error
44output=$( python -m build 2>&1 ) 
55
6- #  Define the expected error  message
7- expected_error= " Could not load any ArrayFire libraries. " 
6+ #  Define the expected output  message
7+ expected_output= " Successfully built " 
88
9- #  Check if the output contains the expected error  message
10- if  echo  " $output "   |  grep -q " $expected_error  " ;  then 
11-   echo  " Expected error  received." 
12-   exit  0  #  Exit with success as the error  is expected
9+ #  Check if the output contains the expected output  message
10+ if  echo  " $output "   |  grep -q " $expected_output  " ;  then 
11+   echo  " Expected output  received." 
12+   exit  0  #  Exit with success as the output  is expected
1313else 
1414  echo  " Unexpected output: $output " 
1515  exit  1  #  Exit with failure as the output was not expected
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments