@@ -43,10 +43,8 @@ const DEFAULT_TESTS: &[&str] = &[
4343 "TestCommissioningWindow" ,
4444] ;
4545
46- /// The default Git reference to use for the Chip repository
47- pub const CHIP_DEFAULT_GITREF : & str = "v1.3.0.0" ; //"master";
4846/// The directory where the Chip repository will be cloned
49- const CHIP_DIR : & str = ".build/itest/connectedhomeip " ;
47+ const CHIP_DIR : & str = "matter_cpp/repo " ;
5048
5149/// The tooling that is checked for presence in the command line
5250const REQUIRED_TOOLING : & [ & str ] = & [
@@ -138,8 +136,8 @@ impl ITests {
138136 /// - Clone the Chip repo if it doesn't exist, or updates it if it does
139137 /// - Activate the Chip environment
140138 /// - Build `chip-tool`
141- pub fn setup ( & self , chip_gitref : Option < & str > , force_rebuild : bool ) -> anyhow:: Result < ( ) > {
142- self . setup_chip_tool ( chip_gitref , force_rebuild)
139+ pub fn setup ( & self , force_rebuild : bool ) -> anyhow:: Result < ( ) > {
140+ self . setup_chip_tool ( force_rebuild)
143141 }
144142
145143 /// Build the executable (`chip-tool-tests`) that is to be tested with the Chip integration tests.
@@ -166,64 +164,25 @@ impl ITests {
166164
167165 fn setup_chip_tool (
168166 & self ,
169- chip_gitref : Option < & str > ,
170167 force_rebuild : bool ,
171168 ) -> anyhow:: Result < ( ) > {
172169 warn ! ( "Setting up Chip environment..." ) ;
173170
174171 let chip_dir = self . workspace_dir . join ( CHIP_DIR ) ;
175- let chip_gitref = chip_gitref. unwrap_or ( CHIP_DEFAULT_GITREF ) ;
176172
177173 // Check system dependencies
178174 self . check_tooling ( ) ?;
179175
180- // Clone or update Chip repository
181- if !chip_dir. exists ( ) {
182- info ! ( "Cloning Chip repository..." ) ;
183-
184- // Ensure parent directories exist
185- if let Some ( parent) = chip_dir. parent ( ) {
186- fs:: create_dir_all ( parent)
187- . context ( "Failed to create parent directories for Chip" ) ?;
188- }
189-
190- let mut cmd = Command :: new ( "git" ) ;
191-
192- cmd. arg ( "clone" )
193- . arg ( "https://github.com/project-chip/connectedhomeip.git" )
194- . arg ( & chip_dir) ;
195-
196- if !self . print_cmd_output {
197- cmd. arg ( "--quiet" ) ;
198- }
199-
200- self . run_command ( & mut cmd) ?;
201- } else {
202- info ! ( "Chip repository already exists" ) ;
203-
204- if force_rebuild {
205- info ! ( "Force rebuild requested, cleaning build artifacts..." ) ;
176+ if force_rebuild {
177+ info ! ( "Force rebuild requested, cleaning build artifacts..." ) ;
206178
207- let out_dir = chip_dir. join ( "out" ) ;
208- if out_dir. exists ( ) {
209- fs:: remove_dir_all ( & out_dir)
210- . context ( "Failed to remove existing out directory" ) ?;
211- }
179+ let out_dir = chip_dir. join ( "out" ) ;
180+ if out_dir. exists ( ) {
181+ fs:: remove_dir_all ( & out_dir)
182+ . context ( "Failed to remove existing out directory" ) ?;
212183 }
213184 }
214185
215- // Checkout the specified reference
216- info ! ( "Checking out Chip GIT reference: {chip_gitref}..." ) ;
217-
218- let mut cmd = Command :: new ( "git" ) ;
219-
220- cmd. current_dir ( & chip_dir) . arg ( "checkout" ) . arg ( chip_gitref) ;
221-
222- if !self . print_cmd_output {
223- cmd. arg ( "--quiet" ) ;
224- }
225-
226- self . run_command ( & mut cmd) ?;
227186
228187 // Detect host platform for selective submodule initialization
229188 let platform = self . host_platform ( ) ?;
0 commit comments