[PATCH] Initial contribution of llgo, a Go frontend

Peter Collingbourne peter at pcc.me.uk
Wed Nov 19 15:24:32 PST 2014


================
Comment at: tools/llgo/test/execution/assignment/namedresult.go:1-4
@@ +1,5 @@
+// RUN: llgo -o %t %s
+// RUN: %t > %t1 2>&1
+// RUN: go run %s > %t2 2>&1
+// RUN: diff -u %t1 %t2
+
----------------
silvas wrote:
> If I'm understanding this use of `go run` correctly, this seems like a very strange testing strategy for the LLVM project.
> 
> It would be as though clang's tests used gcc or msvc as a testing tool and only tested the output of compiled programs.
> 
> Is there a reason you haven't organized your testing like clang? I.e. verifying the compiler's IRGen and diagnostics?
Most of the tests in `test/execution` are from an earlier stage of the project when it was more experimental. I agree with you -- at this point, there is no excuse for making them depend on the output of another compiler.

I'll see if I can rewrite them to use `FileCheck` to check the command output. I also intend to gradually make these tests more focused and move them into the other subdirectories of `test`, but that will take time.

http://reviews.llvm.org/D6327






More information about the llvm-commits mailing list