File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ extends:
182182 sudo apt-get update
183183 sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
184184 echo "##vso[task.setvariable variable=CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER]arm-linux-gnueabihf-gcc"
185+ # Match the legacy static non-PIE binary; Ubuntu armhf lacks rcrt1.o.
186+ echo "##vso[task.setvariable variable=CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUSTFLAGS]-Crelocation-model=static"
185187 displayName: Install armv7 cross toolchain
186188
187189 - script : cargo build --release --frozen --target ${{ platform.target }}
@@ -215,6 +217,11 @@ extends:
215217 }
216218 displayName: Verify Authenticode signature
217219
220+ - task : ComponentGovernanceComponentDetection@0
221+ displayName : Register components for NOTICE
222+ inputs :
223+ scanType : Register
224+
218225 - task : notice@0
219226 displayName : NOTICE file generation
220227 inputs :
Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation.
2+ # Licensed under the MIT License.
3+
4+ import unittest
5+ from pathlib import Path
6+
7+
8+ ROOT = Path (__file__ ).resolve ().parents [2 ]
9+
10+
11+ class DevDivPipelineTests (unittest .TestCase ):
12+ def test_notice_follows_a_registered_component_scan_after_build (self ):
13+ pipeline = (ROOT / 'azure-pipelines' / 'devdiv-pre-release.yml' ).read_text (encoding = 'utf-8' )
14+ build = pipeline .index ('- script: cargo build --release' )
15+ scan = pipeline .index ('- task: ComponentGovernanceComponentDetection@0' )
16+ notice = pipeline .index ('- task: notice@0' )
17+
18+ self .assertLess (build , scan )
19+ self .assertLess (scan , notice )
20+ scan_step = pipeline [scan :notice ]
21+ self .assertIn ('scanType: Register' , scan_step )
22+ self .assertNotIn ('continueOnError: true' , scan_step )
23+ self .assertNotIn ('condition:' , scan_step )
24+
25+
26+ if __name__ == '__main__' :
27+ unittest .main ()
You can’t perform that action at this time.
0 commit comments