
A few tests in the test suite require support for Bash. For example, tests that run a program and send data through stdin to it require some way of piping the data in, and we use a Bash script for that. However, some executors (e.g. an embedded systems simulator) do not support Bash, so these tests will fail. This commit adds a Lit feature that tries to detect whether Bash is available through conventional means, and disables the tests that require it otherwise. Differential Revision: https://reviews.llvm.org/D114612
27 lines
680 B
C++
27 lines
680 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <iostream>
|
|
|
|
// istream cin;
|
|
|
|
// UNSUPPORTED: executor-has-no-bash
|
|
// FILE_DEPENDENCIES: ../send-stdin.sh
|
|
// RUN: %{build}
|
|
// RUN: %{exec} bash send-stdin.sh "%t.exe" "1234"
|
|
|
|
#include <iostream>
|
|
#include <cassert>
|
|
|
|
int main(int, char**) {
|
|
int i;
|
|
std::cin >> i;
|
|
assert(i == 1234);
|
|
return 0;
|
|
}
|