mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Improve tests to call python script through python executable. Even this doesn't cause any errors now, it will be a problem for future when we run CAS tests on Windows platform. Clean up the current test to avoid bad test example.
25 lines
727 B
Swift
25 lines
727 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache %t/main.swift -o %t/deps.json -I %t/include -swift-version 4 -cache-compile-job -cas-path %t/cas -cxx-interoperability-mode=default
|
|
|
|
// RUN: %{python} %S/Inputs/SwiftDepsExtractor.py %t/deps.json clang:MyCXX clangIncludeTree | %FileCheck %s
|
|
// RUN: %{python} %S/Inputs/SwiftDepsExtractor.py %t/deps.json clang:MyCXX moduleCacheKey | %FileCheck %s
|
|
|
|
// CHECK: llvmcas://
|
|
|
|
//--- main.swift
|
|
import MyCXX
|
|
|
|
//--- include/module.modulemap
|
|
module MyCXX {
|
|
header "mycxx.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
//--- include/mycxx.h
|
|
#pragma once
|
|
class A {};
|
|
|
|
void test(const A& str);
|