File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed
Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 3030 - name : Install rust dependencies
3131 run : cargo install cargo-udeps
3232
33+ - name : Debug - Check mock directory structure
34+ run : |
35+ echo "=== Checking harmony-project-1 structure ==="
36+ ls -laR mock/harmony-project-1/entry/src/
37+ echo ""
38+ echo "=== Checking if directories exist ==="
39+ [ -d "mock/harmony-project-1/entry/src/main" ] && echo "✓ main directory exists" || echo "✗ main directory missing"
40+ [ -d "mock/harmony-project-1/entry/src/ohosTest" ] && echo "✓ ohosTest directory exists" || echo "✗ ohosTest directory missing"
41+ [ -f "mock/harmony-project-1/entry/src/main/module.json5" ] && echo "✓ main/module.json5 exists" || echo "✗ main/module.json5 missing"
42+ [ -f "mock/harmony-project-1/entry/src/ohosTest/module.json5" ] && echo "✓ ohosTest/module.json5 exists" || echo "✗ ohosTest/module.json5 missing"
43+
3344 - name : Build
3445 run : pnpm build
3546
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl Module {
5353 *
5454 * @returns The module uri.
5555 */
56+ #[ napi]
5657 pub fn get_uri ( & self ) -> String {
5758 path_clean:: clean ( & self . uri . to_string ( ) )
5859 }
Original file line number Diff line number Diff line change @@ -58,6 +58,25 @@ describe.sequential('sample', (it) => {
5858
5959 it . sequential ( 'should find all products' , ( ) => {
6060 const project1Products = Product . findAll ( project1Module1 )
61+
62+ // Debug: 输出找到的 products 信息
63+ console . log ( `\n=== Product Detection Debug ===` )
64+ console . log ( `Found ${ project1Products . length } products` )
65+ project1Products . forEach ( ( p , i ) => {
66+ console . log ( ` Product ${ i } : directory=${ p . getDirectoryName ( ) } , target=${ p . getTargetName ( ) } ` )
67+ console . log ( ` uri=${ p . getUri ( ) } ` )
68+ } )
69+
70+ // Debug: 输出 module 信息
71+ if ( typeof project1Module1 . getUri === 'function' ) {
72+ console . log ( `Module URI: ${ project1Module1 . getUri ( ) } ` )
73+ } else {
74+ console . log ( `Module build profile path: ${ project1Module1 . getBuildProfilePath ( ) } ` )
75+ }
76+ const buildProfile = project1Module1 . getParsedBuildProfileContent ( )
77+ console . log ( `Targets in build profile:` , buildProfile . targets )
78+ console . log ( `=== End Debug ===\n` )
79+
6180 expect ( project1Products . length ) . toBeGreaterThanOrEqual ( 2 )
6281 project1Product1 = project1Products [ 0 ]
6382 project1Product2 = project1Products [ 1 ]
You can’t perform that action at this time.
0 commit comments