Skip to content

Commit 931a3aa

Browse files
committed
[Driver][test] Fix ClangDriverTest
1 parent 087e7ab commit 931a3aa

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

clang/lib/Driver/Distro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) {
3636
for (StringRef Line : Lines)
3737
if (Version == Distro::UnknownDistro && Line.startswith("ID="))
3838
Version = llvm::StringSwitch<Distro::DistroType>(Line.substr(3))
39+
.Case("alpine", Distro::AlpineLinux)
3940
.Case("fedora", Distro::Fedora)
4041
.Case("gentoo", Distro::Gentoo)
4142
.Case("arch", Distro::ArchLinux)
42-
.Case("exherbo", Distro::Exherbo)
4343
// On SLES, /etc/os-release was introduced in SLES 11.
4444
.Case("sles", Distro::OpenSUSE)
4545
.Case("opensuse", Distro::OpenSUSE)

clang/unittests/Driver/DistroTest.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,10 @@ TEST(DistroTest, DetectDebian) {
275275

276276
TEST(DistroTest, DetectExherbo) {
277277
llvm::vfs::InMemoryFileSystem ExherboFileSystem;
278-
ExherboFileSystem.addFile("/etc/exherbo-release", 0, // (ASCII art)
279-
llvm::MemoryBuffer::getMemBuffer(""));
280278
ExherboFileSystem.addFile("/etc/os-release", 0,
281279
llvm::MemoryBuffer::getMemBuffer("NAME=\"Exherbo\"\n"
282280
"PRETTY_NAME=\"Exherbo Linux\"\n"
283-
"ID=\"exherbo\"\n"
281+
"ID=exherbo\n"
284282
"ANSI_COLOR=\"0;32\"\n"
285283
"HOME_URL=\"https://www.exherbo.org/\"\n"
286284
"SUPPORT_URL=\"irc://irc.freenode.net/#exherbo\"\n"

0 commit comments

Comments
 (0)