diff --git a/cmd/swarm/export_test.go b/cmd/swarm/export_test.go
index 525538ad758f24509fe0353f892753fa796d22d3..20df7b06090426929536906ae5530ae20decbad5 100644
--- a/cmd/swarm/export_test.go
+++ b/cmd/swarm/export_test.go
@@ -14,6 +14,8 @@
 // You should have received a copy of the GNU General Public License
 // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
 
+// +build !windows
+
 package main
 
 import (
diff --git a/cmd/swarm/upload_test.go b/cmd/swarm/upload_test.go
index aba4d0dda8d1e50ed5115e44a3bfefa9a5a18b1a..84205031bb0b0f12dadb17033eb8001fc95d84ff 100644
--- a/cmd/swarm/upload_test.go
+++ b/cmd/swarm/upload_test.go
@@ -14,6 +14,8 @@
 // You should have received a copy of the GNU General Public License
 // along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
 
+// +build !windows
+
 package main
 
 import (