(
repoRoot: string,
bucket: string,
mtimeMs: number,
options?: {
readonly isolationDir?: string
readonly tree?: 'art' | 'gen'
},
)
| 31 | }) |
| 32 | |
| 33 | function createArtifact( |
| 34 | repoRoot: string, |
| 35 | bucket: string, |
| 36 | mtimeMs: number, |
| 37 | options?: { |
| 38 | readonly isolationDir?: string |
| 39 | readonly tree?: 'art' | 'gen' |
| 40 | }, |
| 41 | ): string { |
| 42 | const artifactPath = join( |
| 43 | repoRoot, |
| 44 | options?.isolationDir |
| 45 | ? `buck-out/${options.isolationDir}/${options.tree ?? 'art'}/fbcode` |
| 46 | : `buck-out/v2/${options?.tree ?? 'art'}/fbcode`, |
| 47 | bucket, |
| 48 | 'code/__self_contained_bin__/out/ncode', |
| 49 | ) |
| 50 | mkdirSync(join(artifactPath, '..'), { recursive: true }) |
| 51 | writeFileSync(artifactPath, `artifact:${bucket}\n`, 'utf8') |
| 52 | const seconds = mtimeMs / 1000 |
| 53 | utimesSync(artifactPath, seconds, seconds) |
| 54 | return artifactPath |
| 55 | } |
| 56 | |
| 57 | describe('wrapperPtyHarness artifact resolution', () => { |
| 58 | it('finds self-contained artifact candidates by explicit directory walk', () => { |
no test coverage detected